glNormal()

What does this command do? Thanks! Absolutely new to openGl and trying to dice down each command. Thanks!

BTW I have a cube that spins but I can’t changes it color. I put glColor3f(0.0f,0.0f,1.0f); before the vertexes but no color changes! Any help would be nice. Thanks!

Dustin
aka SilentSno

This specifies the normal for the next vertex. (normals are used for lighting calculations etc.)

A normal specifies how the surface will be lit. Usually, if you don’t want smoothing it will the a normalized (size 1) perpendicular to the polygon. However when you want smooth surfaces then the normal at a vertice is the normalised (meaning size 1) of the normals of all the polygons that share the vertice.

Antonio www.fatech.com/tech

Thanks you two!! I also got the colors to work just need GL_ENABLE(GL_COLOR_MATERIAL)

Dustin
aka SilentSno