About OpenGL Methods Used in This Tutorial

When applying transformations to texture mappings, we must be sure to set the current matrix stack to the one for textures. In particular, the following call must be made.

glMatrixMode(GL_TEXTURE);
Once the texture stack is set as the current one, any calls to glPushMatrix and glPopMatrix and any calls to transformation functions will be applied to this stack. The effect on the stack by any of these functions is exactly the same as when the model-view stack is the current one. In turn, the composite matrix on top of the stack is applied to the texture mapping. Thus, the only thing that is new is setting the texture stack as the current one.