OpenGL Normals

Normals in OpenGL are given with the glNormal function.

Lighting calculations use a normal at each vertex drawn;
you can provide a normal with each vertex, or fewer.

glBegin(GL_TRIANGLES)

glNormal3f(0, 1, 0)
glVertex3f(-1, 0, 0)

glNormal3f(0, 1, 0)
glVertex3f(1, 0, 0)

glNormal3f(0, 1, 0)
glVertex3f(0, 0, 2)

glEnd()

Examples: normal.py ring-normals.py cube.py