Advertisement

Using an undetermined amount of lights in a scene?

Started by September 20, 2000 08:39 AM
1 comment, last by Protozone 24 years, 2 months ago
Hey, I''m wondering how I can use a undetermined amount of lights in a scene (ie. read them in from a file at run-time) since when working with lights I have to specify GL_LIGHT0 or GL_LIGHT1 ,ect. Any help is appreciated...
Protozone
Might try having at the top of the file how many lights are to be initialized then have a loop that runs through that many times... You have to remember that ogl only handles 8 lights at a time, tho.

S.
Advertisement
u can see if your already using a light with glIsEnabled(GL_LIGHT0) etc. also gl must be able to support at least 8 lights though there is no upper limit to the number it can support

This topic is closed to new replies.

Advertisement