You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
I don't know if this is actually a bug. I am trying to add a few dynamic lights to my scene, however only the first two lights are rendered, the rest are ignored. I had a look at the addDynamicLight function in the OpenGL driver class. It appears to me that the following fragment of code might cause the problem I encounter.
If the code intends to query the maximum number of light supported byt the hardware, should we use glGetIntegerv function with the token GL_MAX_LIGHTS rather than the GL_MAX_LIGHTS token itself?
I came up with a slight modification which still needs to be tested.
void COpenGLDriver::addDynamicLight(const SLight& light)
{
++LastSetLight;
int nMaxLights;
//ask opengl how many lights are supported
glGetIntegerv(GL_MAX_LIGHTS, &nMaxLights);
if (!(LastSetLight < nMaxLights)
return;
...
}
With the modification, the opengl driver now returns the correct amount of dynamic light supported by the driver, 8 in my case. However it still has solved the lighting problem i have.
Max lights value is fixed in SVN now, thanks for reporting. I think I never tried scenes with mre than two lights visible at once, so I cannot help with your initial problem