Light system bug fixes

Moved some OpenGL calls that took place outside of the opengl events (and therefore were trying to use non-current contexts) and fixed the math in the Lighting fragment shader to correctly fade lights when the camera has been moved.