views:

271

answers:

1
+6  A: 

OpenGL already contains this functionality. You want glPushAttrib(GL_ALL_ATTRIB_BITS); and glPopAttrib();. See http://opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushattrib.html for more.

Rune
Wow. I have never come across that. It seemed like something so useful they'd have to have a way to do it. Thanks.
Whaledawg