Hi,
I am making a solar system scene. I am using glutSolidSphere() to make the sun and the planets. I currently have ambient light for the scene and some sun emissive light.
I would like for the side of each planet that is facing the sun to be lighted. I assume this is done using diffuse light. I think I have the initial setup right (except normals-declaration), but am not seeing the light effects.
I did the following:
-positioned a light (GL_LIGHT0) at the location of the sun
-enabled LIGHT0
-and I enabled the diffuse property of the planet material (GL_AMBIENT_AND_DIFFUSE)
I know that I need normals for the surface so the diffuse intensity can be derived. So my question is this: does OpenGL ‘know’ the normals when using glutSolidSphere()? If not, is there an easy way to make some for a sphere?
Any help is much appreciated!
Thanks,
Bob