[HOpenGL] Confused about normals
Patrick Scheibe
mai99dnn at studserv.uni-leipzig.de
Tue Oct 14 02:14:50 EDT 2003
First I want to thank Sven for solving
the problem with the missing normals.
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.
That means if you look at a plane the normal vector points to you.
Is'nt that true?
My example problem seems to show that this is definitly not true. So if I want
to use light (and that will be very often) and I have to specify these
vectors by myself then I can't use the renderPrimitive Polygon or Quad in
situ because the calculation of a normal vector of a polygon isnt that
trivial.
The simplest way I see is to reduce this calculation to a normal vector
calculation of a triangle. So I'm forced to define a new function
makePoly taking a list of Points, calculating the normal and draw a polygon
with this points. Otherwise I have to write down some points more then one
time, the first time in the makenormal-function and in the secont at the
render call.
1. Is this the way?
2. Where is it used that normals aren't right-angeled to the polygon-plan?
3. Exists there some higher-level function.
With best regards
Patrick
More information about the HOpenGL
mailing list