PDA

View Full Version : What's wrong with ogl lighting?



Sam_dup1
02-27-2001, 08:52 AM
When creating a stationary light source w.r.t the scene and move around, surfaces seem to be lit in a random manner. I change the position of the source each time the scene gets rendered using the current view matrix. The normals are oriented correctly.
I think it's opengl implementation-related problem. Is'n it?

rhmazza
02-28-2001, 07:34 AM
Are you calling
glLightfv(GL_LIGHT0, GL_POSITION,
<array containing light position> );?
You have to make sure you set the light's position each time the scene is rendered.

-Ray