Incorrect returned value in getMaximalDynamicLightAmount()

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.
Post Reply
Kelo
Posts: 15
Joined: Tue Jan 06, 2004 2:57 pm
Location: Argentina

Incorrect returned value in getMaximalDynamicLightAmount()

Post 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).
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Already been fixed in the SVN version.
Post Reply