what is glNormalf ?

Hi all!
Sorry for my English. U hope you’ll understand something.

What is normalie? As I realy should use glNormalf to make my polygons look correctly or it can be done automaticaly by using something. And what is glEnable(GL_NORMALIZE) how it change my polygons

glNormalf is a command for establishing the normal of the polygon you are going to draw next.
In other words you should call it before drawing each polygon.

Once you use lighting in OpenGl you’ll have to use normals. Without normals opengl doesnt know how to shade.

Either you can manually calculate the normals (vector math) or you can load them from a program that already calculates them, for example 3d studio, etc. However you’ll have to code a way to parse a 3d studio file.

glEnable(GL_Normalize) normalizes the normal vectors for you with a small performance hit. Normals should be normalized (that is norm =1 ), if not shading looks bad.

I hope you get the idea.

:slight_smile:

The normal points in the direction of the “surface” of the polygon, if you want to calculate it yourself you use something called Cross product