AuxSphere : Texture : Lighting

I’m having problems with making an AuxSolidSphere appear to be lit from above.
Setting a color before i draw it doesn’t work but disabling lighting then defining a color works…it’s not shaded though.
Any suggestions?

You need normals for lighting to work properly. I don’t think auxSolidSphere supports normals (I could be wrong). Use gluSphere or if you are using GLUT use glutSolidSphere, or write your own sphere function.

If it does support normals, make sure you enabled both GL_LIGHTING and GL_LIGHTn where n is the light number 0 - 7 (total of 8 lights typically). Also, make sure your light position and direction are correct with respect to position of sphere, etc, etc, etc.

About the color not working when lighting is enabled… You won’t see the color work with lighting. When lighting is enabled it uses material properties instead. (Look at glMaterial* functions.) You can enable GL_COLOR_MATERIAL so that using glColor sets some of the material properties, but you are still really just using materials.