More than GL_LIGHTn lights?

Started by
13 comments, last by Drag0n 22 years, 6 months ago
This question has popped up a few times on these boards before.MENTAL pretty much nailed it. You never need more than 8 lights on one particular mesh, in fact, 8 is usually too much because of the huge slowdown you get with multiple lights. For instance, FPS with 8 lights is usually about 10% of that with 1 light. If you really feel you need 8 lights acting on a particular polygon, use static lightmaps or devise your own software lighting solution (as in Quake2).

www.elf-stone.com

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

Advertisement
i rule


MENTAL
No I rule... End of story.

------------------------------
Trent (ShiningKnight)
E-mail me
ShiningKnight Games
Trent, are you stalking every thread i post on?!?!?!

oh yeah, you have to - you moderate this forum.

there goes my conspricicy theory .

MENTAL
I''m not sure for platforms other than MSVC/Win32, but the MSDN docs say that GL_LIGHTn is guaranteed to be GL_LIGHT0+n. You can query the maximum number of lights by doing:

int numOfLights = 8;
glGetIntegerv (GL_MAX_LIGHTS, &numOfLights);

Still, as has been said by others: don''t use that many lights anyway...

This topic is closed to new replies.

Advertisement