PDA

View Full Version : How to add a light if white ambient light is active?



FedorSymkin
11-21-2014, 12:58 PM
Hello. Newbie question )

I have the room without lighting (GL_LIGHTING = false). I need to enable lighting and add a light to corner of room. Another part of room should be same as it was before. When GL_LIGHTING = true to prevent darkening of room I have to enable ambient light (1,1,1,1). But if ambient light is white, any other lights are useless.

So how can I enable GL_LIGHTING and GL_LIGHT0 without darkening of room? Is it possible without using shaders?

GClements
11-21-2014, 02:40 PM
You could just add lots of lights so you're lighting the rest of the scene. Or you could render the rest of the scene separately with lighting disabled (or with saturated ambient light). Or you could use light-maps (which requires either shaders, multi-texturing, or multiple rendering passes).