View Full Version : lighting an object in 3d world, Help

04-04-2002, 02:57 PM
i am trying to get a light source to begin at the origin of the system, I have objects rotating around the light source. The problem is that I can't get the light to reflect off the surface facing the light source, it reflects the light is if it was coming from the behind the viewer. If anyone knows what i am doing wrong please help.

04-04-2002, 03:04 PM
Make sure you're calculating the normals for each surface and letting OpenGL know of them before rendering the frame.

04-04-2002, 03:48 PM
Your light position is getting transformed
by the current model view matrix. You need
to set light position after glLoadMatrix
(or whatever you use).