Basic Image AlgorithmS Library
2.8.0
|
push and pop GL states on constructor/destructor
Helper class pop(save) OpenGL states on construction and push them on destruction automatically. More...
#include <Utils/StatekeeperGL.hh>
Public Member Functions | |
StatekeeperGL () | |
constructor, pushes major OpenGL states More... | |
StatekeeperGL (const GLbitfield &mask) | |
constructor, pushes OpenGL state as given by mask GLbitfield mask More... | |
~StatekeeperGL () | |
destructor, pops OpenGL state More... | |
push and pop GL states on constructor/destructor
Helper class pop(save) OpenGL states on construction and push them on destruction automatically.
Using matching push/pop pairs is easy with this class. Sample usage:
// begin var. scop { // save state by push StatekeeperGL myTmp; // change the state, fire GL calls ... // reload state by destructors pop call automatically } // end var. scope
There should not be a performance impact if you use display lists.
Definition at line 57 of file StatekeeperGL.hh.
|
inline |
constructor, pushes major OpenGL states
Definition at line 60 of file StatekeeperGL.hh.
|
inline |
constructor, pushes OpenGL state as given by mask
GLbitfield mask
Definition at line 75 of file StatekeeperGL.hh.
|
inline |
destructor, pops OpenGL state
Definition at line 80 of file StatekeeperGL.hh.