GL_NORMALIZE does not calculate any normals for you, which is why you
cannot compare it to glNormal at all. It just makes your already calculated
normals unit length. This might come in handy if you are using glScale, for
example, which would also scale the lengths of your normals. Using
GL_NORMALIZE prevents your lighting on that object from messing up.
hth
--
jb
(replace y with x if you want to reply by e-mail)
Neither GL_NORMALIZE (as Jakob Bieling points out) nor glNormal will
"calculate
the normal for each polygon" -- you have to do that yourself and then
tell OpenGL
about it using glNormal.
Andy V
> but without using either of them, my lighting still looks pretty good.
Depends on what you mean by 'pretty good' and how you created the
models.
> so what's the point in using those functions ?
The point of enabling GL_NORMALIZE is to prevent your normals from
messing up when you use, for example, glScale. It makes sure that your
normals are always unit length (ie. length = 1). Because if your normals are
not unit length, then you either should really know what you are doing, or,
as it is more often the case, your lighting will be 'strange'.
The point of glNormal is to set the current normal vector. Unless you
specify a new normal vector using glNormal, all polygons you feed to OpenGL
will use this normal. The normal of a polygon determines how the light and
the POV affects the polygon.
Normals can make the surface look curved instead of it being obvious with
light (especially with bigger polygons) where the edges between polygons are
as each polygon would have without setting normals just one shade of light.
Lets say you wanted a sphere, if you don't have normals, each polygon of the
sphere would have lines on it's edges, and it would be obvious where the
edges of polygons are. If you have normals then it would look totally
smooth and the only way you would be able to tell there are polygons is by
looking at the siloette (don't know how to spell that one :))
-----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----