Reset all states

Hi,

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

Thanks

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.