Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
BIAS::StatekeeperGL Class Reference

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...
 

Detailed Description

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.

Author
Jan Woetzel

Definition at line 57 of file StatekeeperGL.hh.

Constructor & Destructor Documentation

BIAS::StatekeeperGL::StatekeeperGL ( )
inline

constructor, pushes major OpenGL states

Definition at line 60 of file StatekeeperGL.hh.

BIAS::StatekeeperGL::StatekeeperGL ( const GLbitfield &  mask)
inline

constructor, pushes OpenGL state as given by mask

GLbitfield mask

Definition at line 75 of file StatekeeperGL.hh.

BIAS::StatekeeperGL::~StatekeeperGL ( )
inline

destructor, pops OpenGL state

Definition at line 80 of file StatekeeperGL.hh.


The documentation for this class was generated from the following file: