PDA

View Full Version : GL_LIGHTn - sequential?



04-15-2004, 03:57 PM
Just out of interest, is the integer value of GL_LIGHTn guaranteed to be (GL_LIGHT0 + n), or is this behaviour implementation-dependent?

(Not an important question - just my mind wandering again...)

ce110ut
04-15-2004, 04:48 PM
I think there's only 8 GL_LIGHTn's, as far as opengl 1.2[?]

going from 0-7. you can play with it and see.
ex: GL_LIGHT8, GL_LIGHT20, etc

can somebody confirm?

-=[ best regards ]=-

Curandero
04-15-2004, 04:54 PM
Only 8 in the standard, but some cards/platforms do more, as I understand it.

-Matt

Bob
04-16-2004, 02:08 AM
The specification (http://www.opengl.org/documentation/spec.html) always have the answer to questions like this. Everyone should have a copy. See page 60 in the latest spec.

ZbuffeR
04-16-2004, 10:44 AM
Just as said bob.

By the way, as the values are defined on gl.h, it can not be implementation dependant.
----
/* LightName */
#define GL_LIGHT0 0x4000
#define GL_LIGHT1 0x4001
#define GL_LIGHT2 0x4002
#define GL_LIGHT3 0x4003
#define GL_LIGHT4 0x4004
#define GL_LIGHT5 0x4005
#define GL_LIGHT6 0x4006
#define GL_LIGHT7 0x4007