View Full Version : Lights

03-21-2001, 02:11 AM

I have trouble: I can't enable more than one light source. If I use glEnable with GL_LIGHT1-GL_LIGHT7 it doesn't work!

Please, help...

P.S. Forgive me mine English, pls :-)

03-21-2001, 03:10 AM
GL_LIGHT1 and up is black by default, make sure you set their light parameters properly before using them.

03-21-2001, 07:31 AM
Yes, I sure that I set light parameters...

03-21-2001, 08:55 AM
How'd you set the light paramaters? What exactly do you mean by them not working? At the minimum you'll have to set the diffuse and/or the ambient color properties for those lights. You'll probably need to set the positional/directional properties as well.

03-21-2001, 11:51 PM
I set for the GL_LIGHT1 default parameters:

GL_DIFFUSE (1.0, 1.0, 1.0, 1.0)
GL_SPECULAR (1.0, 1.0, 1.0, 1.0)

...but it doesn't take effect.

Or I must set something else?

03-22-2001, 12:06 AM
Try remove (comment out that is) all code for all light but GL_LIGHT0. Then rename ALL GL_LIGHT0 to GL_LIGHT1, it that gives you the same result, you are obviously missing something important with the other lights in the old version.

Can be a driver issue aswell. Try updare your display drivers.

03-23-2001, 04:30 AM
Yes, I miss some important light parameters.

Thanks for help!