OpenGL State Helper

group FnGLStateHelper

Enums

enum Bit

Each client is responsible for setting up their own renderstate before submitting draw jobs. Often a client will need to temporarily change state for their purpose. The purpose of GLStateRestore is to provide a RAII mechanism to do this. The various bits to restore.

Values:

enumerator Enable
enumerator AccumuBuffer
enumerator ColorBuffer
enumerator Current
enumerator DepthBuffer
enumerator Eval
enumerator Fog
enumerator Hint
enumerator Lighting
enumerator Line
enumerator List
enumerator Multisample
enumerator PixelMode
enumerator Point
enumerator Polygon
enumerator PolygonStipple
enumerator Scissor
enumerator StencilBuffer
enumerator Texture
enumerator Transform
enumerator Viewport
enum Binding

Bindings to unbind on destruction.

Values:

enumerator UnbindArrayBuffer
enumerator UnbindTexture
enumerator UnbindVertexArray
enumerator UnbindProgram
enumerator UnbindAll
class GLStateRestore
#include <FnGLStateHelper.h>

Provide a RAII mechanism to temporarily change the OpenGL state.

Public Functions

inline explicit GLStateRestore(GLbitfield mask, Bindings bindings = 0)

Constructor. mask should be any combination of the Bit enumeration values.

inline ~GLStateRestore()

Destructor.