I have a question about using glRotate: Say I want to rotate an object by 180 degrees about the coordinate system x-axis and then 180 about the coordinate system y-axis. It seems that when I do this, it performs the first rotation correctly, but the second rotation is inverted. i.e., it will be in the opposite direction from if I just do a 180 rotate about the y-axis without a prior 180 x-axis.

Yes, that’s right. Rotations, like the other transformations, are relative to the current coordinate space, not to some “global” coordinate space.

Imagine a transparent analog clock lying flat on a table, face up. If you look down on it from above the hands appear to be moving clockwise. If you turn the clock face down, the hands will now appear to be moving anticlockwise, even though you’re still looking at it from the same viewpoint and the clock itself is doing exactly the same thing as before.

Thanks! So then there’s no way to keep the axes in global coordinates while rotating an object?