View Full Version : "normal" & glNormal*( )

10-29-2000, 01:02 AM
I don't understand what does "normal" mean.
And what is glNormal*() used for?

10-29-2000, 01:48 AM
/|\ normal n
/ | /
/ | Plane P /
/ /

glNormal*() is used to pass to OpenGL what the normal for a particular plane is, and this is used by OpenGL for lightning issues.

For example: if the plane P drawed above would be a plane that went through the x and z-axis, then a valid normal would be (0.0f, 1.0f, 0.0f). Normals can also be larger than this one, (0.0f, 3.0f, 0.0f) is also a valid normal for plane P.

But to use glNormal*() you should use unified normals, that means that the lenght of the normal should be equal to 1.

You should check Nehes tutorial on this: http://nehe.gamedev.net/tutorials/lesson07.asp

Also the lightning chapter of the OpenGL Superbible : http://nehe.gamedev.net/tutorials/lesson07.asp
gives you a good introduction on this topic.

Hope this helps,

Daniel Palomo van Es

[This message has been edited by DPalomo (edited 10-29-2000).]

[This message has been edited by DPalomo (edited 10-29-2000).]

10-29-2000, 06:40 AM
Thank you very much, Daniel. http://www.opengl.org/discussion_boards/ubb/smile.gif

10-30-2000, 06:05 AM
in simple terms the normal tells opengl which side of your polygon is front and which is back, i.e. the normal is on the front of the polygon. also...
eqn of a plane is
where a, b, c are the normal of the plane(or rather its orientation in space) and d is the distance of this plane from an origin