PDA

View Full Version : Reset all states



Valkyr
06-07-2006, 04:16 PM
Hi,

is there a way to reset all the states (lighting, texturing, depth testing, ...) to there default values in a simple way?


Thanks

RigidBody
06-08-2006, 01:54 AM
when you've made the context current for the first time, call glPushAttrib(GL_ALL_ATTRIB_BITS). this will save all attributes.

afterwards, you can call glPopAttrib to restore the default states.