nCine::GLCullFace class

Manages the OpenGL face culling state.

Static wrapper that caches the current face culling state (GL_CULL_FACE enable flag and the glCullFace mode) so that redundant OpenGL calls are skipped when the requested state matches the cached one.

Public types

struct State
Holds the cached face culling state.

Public static functions

static auto IsEnabled() -> bool
Returns whether face culling is enabled.
static void Enable()
Enables face culling.
static void Disable()
Disables face culling.
static void SetMode(GLenum mode)
Sets the culled face mode.
static auto GetState() -> State
Returns the whole cached face culling state.
static void SetState(State newState)
Restores the whole face culling state.

Constructors, destructors, conversion operators

GLCullFace() deleted
~GLCullFace() deleted

Function documentation

static void nCine::GLCullFace::SetMode(GLenum mode)

Sets the culled face mode.

Parameters
mode Culled face mode (GL_FRONT, GL_BACK or GL_FRONT_AND_BACK)