matrix stack

Can the matrix stack be used to perform hierarchy transformation?

for instance…
if I push the upper arm transform onto the stack, draw the upper arm, and then push the lower arm transform onto the stack and draw the lower arm, will the lower arm be rotated by the upper arms transform aswell?

Or is the matrix stack just used to store independant matrices?

Yes, you can do hierarchical stuff like that. When you call glPushMatrix() the current matrix will get duplicated and the new copy will get on top of the stack.

[This message has been edited by Humus (edited 06-04-2001).]

Thanks for that. I see exactly what you mean.