View Full Version : Enable/Disable Lighting or Light0?
06-14-2001, 07:34 AM
When enabling/disabling lighting with one light, is it proper to enable/disable GL_Light0 as well as GL_Lighting, or instead of? When you leave lighting enabled and light0 disabled, is there an unnecessary performance cost for parts of the scene that don't need lighting (bitmaps, flat shapes, etc)?
06-14-2001, 12:23 PM
Lighting, means tell gl to use lighting calculations in the render pipline.
LIGHT0, is a definition of a light implementation. i.e. type of light, position, color, attenuation etc. etc..
GL allows for 8 lights, GL_LIGHT0, to GL_LIGHT7.
To use 1 light, you can use any one of these. They need enabling also for their values to be used.
need to do this IIRC
//setup light 0.
06-14-2001, 12:46 PM
Nutty, I think he wanted to know what is better to do if he doesnt need lighting to render something, to disable his lights, or to disable all lighting...
06-14-2001, 01:50 PM
DOH! That'll teach me to answer questions on the piss!
Probably disable GL_LIGHTING.
Thats what I would do anyway.
Nutty (pissed as a fart)
zed (sober unfortunately)
not being a driver writer
ild say this is better
i have a feeling with this way if lighting is enabled the driver will have to check what lights are enabled
06-15-2001, 05:54 AM
I agree that disabling GL_LIGHTING would be the way to go. If you were to just disabled GL_LIGHT0, you would disable all lights, but lighting would still be performed so everything would be dark! You'd then have to rely on the ambient lighting properties if you wanted to even see anything.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.