light and texture


I want to draw objects at same time with some light objects and some texture objects in 3D Scene.

I know I have to disable light when I draw texture objects. How can I draw light objects while drawing texture objects?

Thanks very much

You don’t have to disable lighting when enableing texturing. If you want to light and texture polygons at the same time, enable both lighting and texturing and apply the texture with GL_MODULATE (don’t forget to define a materail for the lighting to behave properly).

Thank you!!!

let me try it.