- fixed a few gl_SetFog calls.
- use the parameter buffer to store dynamic lights which should solve all the problems caused by using a simple uniform array.
- use parameter buffer for texture matrices.