
14 Oct
2003
14 Oct
'03
10:51 a.m.
Patrick Scheibe wrote:
[...] But now I am a little bit confused. I'm sure to heard about that if you specify the vertexes of a polygon (with glBegin GL_POLYGON in c) counterclockwise then the normalvector is set automatically. [...]
I think you refer to the fact that OpenGL has a notion of "front" and "back" for polygons. You can control which order (clockwise or counter-clockwise) should be considerered "front" via frontFace. Another tip regarding normals and lighting: Most of the time it's a good idea to have normals of unit length. If your application can't assure this, normalize and rescaleNormal can help. Cheers, S.