CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::GLCapability Struct Referencefinal

A helper class that wraps a OpenGL capability. More...

#include <CeresEngine/RenderAPI/OpenGL/GLStateManager.hpp>

Public Member Functions

 GLCapability (const GLenum capability, const bool defaultState=false)
 Creates a new GLCapability wrapper.
 
GLCapabilityoperator= (const bool state)
 Sets the capability state value.
 
 operator bool () const
 Gets the current capability state value.
 

Public Attributes

GLenum capability
 The OpenGL capability constant.
 
bool current
 The current state.
 

Detailed Description

A helper class that wraps a OpenGL capability.

Assigning a boolean value to an object of this class will update the OpenGL state with a call to glEnable or glDisable.

Constructor & Destructor Documentation

◆ GLCapability()

CeresEngine::GLCapability::GLCapability ( const GLenum  capability,
const bool  defaultState = false 
)
inline

Creates a new GLCapability wrapper.

Parameters
capabilityThe OpenGL capability constant
defaultStateThe default initialization value (as defined by the OpenGL spec). Most values are false.

Member Function Documentation

◆ operator bool()

CeresEngine::GLCapability::operator bool ( ) const
inline

Gets the current capability state value.

Returns
The current capability state value

◆ operator=()

GLCapability & CeresEngine::GLCapability::operator= ( const bool  state)
inline

Sets the capability state value.

Parameters
stateThe new state value
Returns
*this

Member Data Documentation

◆ capability

GLenum CeresEngine::GLCapability::capability

The OpenGL capability constant.

◆ current

bool CeresEngine::GLCapability::current

The current state.


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