View Full Version : Ambient lighting

12-13-2003, 04:55 AM
Is ambient lighting related to GL_LIGHT0? In other words, do I need any lights at all enabled (apart from enabling lighting itself) to use just ambient lighting?

12-13-2003, 05:26 AM
Each light have it's own ambient light, and you must have that light enabled for the ambient light to have any effect. However, there is a global ambient light, which is not tied to a specific light, and to get that you only have to enable lighting, not a specific light.

Check out glLightModel and GL_LIGHT_MODEL_AMBIENT. Default global ambient light is (0.2, 0.2, 0.2, 1.0).