Edit

Share via


Matrix Transformations

Vertices and normals are transformed by the modelview and projection matrices before they're used to produce an image in the framebuffer. Use functions such as glMatrixMode, glMultMatrix*, glRotate*, glTranslate*, and glScale* to compose the desired transformations. Or specify matrices directly with glLoadMatrix* and glLoadIdentity. Use glPushMatrix and glPopMatrix to save and restore modelview and projection matrices on their respective stacks.