OpenGLContext.debug.state

Store and report differences in OpenGL engine state
The idea of this module is to allow you to watch for unexpected changes across complex code hierarchies.
It is particularly useful if you have a single pass of your renderer operating correctly, but all subsequent passes fail. Instantiating a State object on the first pass, then using its diff method on a State instantiated during the second pass will return a dictionary with the changed OpenGL state values mapped to the original and new values.
Usage example:
s = state.State () if self.context.lastState: print self.context.lastState.diff( s ) self.context.lastState = s
Note: the state stored is not the entire machine state, simply because I haven't implemented that. What you get currently is the subset of state from the original glGet demo.

Classes