Page 1 of 1

Incorrect returned value in getMaximalDynamicLightAmount()

Posted: Fri Sep 01, 2006 12:31 am
by Kelo
Hello everybody, I found this bug on the GL implementation, the function getMaximalDynamicLightAmount() on the COpenGLDriver.cpp file (lline 1786) is returning a constant value defined in gl.h!! wich is 0x0D31 (in my gl.h header):


s32 COpenGLDriver::getMaximalDynamicLightAmount()
{
return GL_MAX_LIGHTS;
}

it should be changed for something like this:

s32 COpenGLDriver::getMaximalDynamicLightAmount()
{
GLint maxl = 0;
glGetIntegerv(GL_MAX_LIGHTS, &maxl);
return maxl;
}

And in a normal GL implementation it should return 8 (and not 0x0D31) :D

If you have any doubt, you may write my: emruiz81@yahoo.fr (Ezequiel Ruiz).

Posted: Fri Sep 01, 2006 3:54 am
by vitek
Already been fixed in the SVN version.