View Full Version : Maximum of 8 OpenGL Lights?

03-01-2001, 08:52 AM
I have got the impression, I think from the openGL superbible that you can have a maximum of 8 OpenGL lights in a scene, reffered to as GL_LIGHT0 to GL_LIGHT7. Is this the case or can you have more? I can see that there might be a limit for speed reasons but 8 seems like quite a small number.
I can always write my own simple lighting routines if nesesary but there is not point reinventing the wheel. Is there a way around this limit if it exists?
Thanks in advance,


03-01-2001, 10:14 AM
first it is implementation dependant and you may only use max (8) lights AT A TIME not total

Serge K
03-01-2001, 11:59 AM
GLint nMaxNumberOfLights;
glGetIntegerv( GL_MAX_LIGHTS, &nMaxNumberOfLights );

The maximum number of lights is implementation specific (at least 8, up to 32)

for example,
GeForce - 8 lights,
3Dlabs Oxigen GVX.. - 16 lights,
Wildcat 4105..5110 - 24 lights.

03-01-2001, 03:07 PM
Here is a interesting page http://reality.sgi.com/mjk/tips/VirtualizedLights/VirtualizedLights.html

Tim Stirling
03-02-2001, 08:57 AM
I think the GeForce3 can have up to 64 lights!!! http://www.opengl.org/discussion_boards/ubb/smile.gif

03-02-2001, 07:18 PM
OUCH!!!! http://www.opengl.org/discussion_boards/ubb/smile.gif Too bad it's gonna be selling for $600 d*** dollars...

03-03-2001, 05:08 PM
I'm realatively new to OpenGL so it'd take me a while to wade through this but, how do they allow for 300 lights in this demo?

Any1 know what they're doing here?

03-03-2001, 06:27 PM
Nm, I see that they're doign the same thig in the 300 lights demo as that virtual light thing in mango's link.