01/30/2003
15-462 Graphics I
11
The Matrix and Attribute Stacks
•Mechanism to save and restore state
–glPushMatrix();
–glPopMatrix();
•Apply to current matrix
•Can also save current attribute values
–Examples: color, lighting
–glPushAttrib(GLbitfield mask);
–glPopAttrib();
–Mask determines which attributes are saved