Transformations are not (in general) commutative. Applying the same set of transformations in two different orders can produce two different results.
/* X, then Y */
glRotatef(45.0, 1.0, 0.0, 0.0); glRotatef(90.0, 0.0, 1.0, 0.0); |
/* Y, then X */
glRotatef(90.0, 0.0, 1.0, 0.0); glRotatef(45.0, 1.0, 0.0, 0.0); |
A series of OpenGL transformations are applied in what might look like reverse order, viewed from the world coordinate system.
Viewed alternatively, each transformation is applied to the local coordinate system of everything that follows.