Problems with GL_LIGHTING

WhenI enable the lighting, my object doesn t have any more colors. The problem lasts when I light the scene with white color (1,1,1) so it s not a problem of the lighting color.
Could anyone please help me?

Your object is in grayscale?

Did you define materials for your objects triangles too?..

Originally posted by aaarg:
WhenI enable the lighting, my object doesn t have any more colors.

When you enable lighting, the color information is “thrown away”. The only color data that OpenGL uses then is the material properties (ambient, diffuse, specular colors). To get a correct shading, also don’t forget to specify vertex’s normals.

[This message has been edited by Azdo (edited 05-16-2002).]

When you use lighting, the color is treated diffrently, maped like a material. You need to enable color under lighting, add this to your code before drawing anything: glEnable(GL_COLOR_MATERIAL);

Originally posted by aaarg:
WhenI enable the lighting, my object doesn t have any more colors. The problem lasts when I light the scene with white color (1,1,1) so it s not a problem of the lighting color.
Could anyone please help me?