View Full Version : How to make sure all lighting is turned off..

11-01-2005, 07:12 PM
I've got a situation where I'm switching from one scene to another using a keyboard key. scene 1 and scene 2 have the same exact lighting/Lights enabled. The first scene displays OK, but as soon as I hit the keyboard key the second scene is rendered and the lighting is VERY bright, as if lighting carried over from the first scene.

The same is true if I display scene 2 first, it looks good. As soon as I switch to scene 1, that scene is brighter than it should be.
So, how do I make sure all lighting is disabled when switching?
Ive tossing the following code into a function and I call it right before I do the second scene :
It doesnt do the trick though. Any suggestions?

11-02-2005, 06:18 AM
glDisable(GL_LIGHTING) does not mean getting darker. Instead, the objects will be rendered with only their colours. For example, if the surface(or vertex) colour was white, it looks like pure white without any shading.

Try to disable only each light source, for instance, glDisable(GL_LIGHT0).