View Full Version : lighting an object in 3d world, Help
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).
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.