lighting removes colors..??

i´m writing a pretty simple demo with a few colored objects flying around. i use one white light source (inifinte viewpoint mode) with some ambient. now if i turn the lighting on, my objects get shaded very pretty but all the color is gone, everything’s gone grey-toned.
what do i have to do, i´ve defined normal vectors for all vertices, defined materials for the polygons and set the shading model to smooth but i can´t find the reason why lighting removes all the color.
any suggestions?

Usually when this happens it is because you were specifying colors using glColor, not materials. When that is the case, you can fix it with a glEnable(GL_COLOR_MATERIAL).

Since you said in your post that you are specifying material properties, the only thing I can think of is that somehow you’re not specifying them correctly.

Sorry I can’t be any more specific than that.

ok, enabling GL_COLOR_MATERIAL brings back the color, but now all the pretty shading of my glutSolidSphere is gone, it´s back to plain white…

By any chance did you use glColor for your polygons and glMaterial for your glutSolidSphere? You can only use one method. glMaterial is generally preferrable unless you have to change the vertex material properties a lot.

Also, if you use glScale you’ll have to enable normalization of the lighting normals for the lighting equation to work correctly. Otherwise they might be too long and stuff will be mostly white.