PDA

View Full Version : lightning problem



04-15-2004, 02:49 PM
i have a weird problem
i draw a cube using glutSolidCube() and add one source of lightning, move my camera using
glLookAt() around it and the cube lighted all the way.
the problem is when i do just the same but when
i drew a cube using poligons, that way half cube is lighted and half is not
i do not change anything else but the object

Curandero
04-15-2004, 04:53 PM
hard to say, but my guess is that the normals are off somehow. Try a glEnable( GL_NORMALIZE ) with the poly on and see what happens.

Hope it helps
-Matt

ZbuffeR
04-16-2004, 10:39 AM
As said Curandero, check your normals : they all should point out of each face. It is possible the dark part has normal going inside.