globjects::State Class Reference

`#include <globjects/include/globjects/State.h>`

Inheritance diagram for globjects::State:

## Public Types

enum | Mode { DeferredMode, ImmediateMode }

## Public Member Functions

| State (Mode=ImmediateMode)
void | setMode (Mode mode)
Mode | mode () const
void | apply ()
virtual void | enable (gl::GLenum capability) override
virtual void | disable (gl::GLenum capability) override
virtual bool | isEnabled (gl::GLenum capability) const override
virtual void | enable (gl::GLenum capability, int index) override
virtual void | disable (gl::GLenum capability, int index) override
virtual bool | isEnabled (gl::GLenum capability, int index) const override
virtual void | add (StateSetting *setting) override
Capability * | capability (gl::GLenum capability)
const Capability * | capability (gl::GLenum capability) const
std::vector< Capability * > | capabilities () const
StateSetting * | setting (const StateSettingType &type)
const StateSetting * | setting (const StateSettingType &type) const
std::vector< StateSetting * > | settings ()
std::vector< const StateSetting * > | settings () const
Public Member Functions inherited from globjects::AbstractState
void | setEnabled (gl::GLenum capability, bool enabled)
void | setEnabled (gl::GLenum capability, int index, bool enabled)
void | blendColor (gl::GLfloat red, gl::GLfloat green, gl::GLfloat blue, gl::GLfloat alpha)
void | blendColor (const std::array< gl::GLfloat, 4 > &color)
void | blendFunc (gl::GLenum sFactor, gl::GLenum dFactor)
void | blendFuncSeparate (gl::GLenum srcRGB, gl::GLenum dstRGB, gl::GLenum srcAlpha, gl::GLenum dstAlpha)
void | clearColor (gl::GLfloat red, gl::GLfloat green, gl::GLfloat blue, gl::GLfloat alpha)
void | clearColor (const std::array< gl::GLfloat, 4 > &color)
void | clearDepth (gl::GLfloat depth)
void | clearStencil (gl::GLint s)
void | colorMask (gl::GLboolean red, gl::GLboolean green, gl::GLboolean blue, gl::GLboolean alpha)
void | colorMask (const std::array< gl::GLboolean, 4 > &mask)
void | cullFace (gl::GLenum mode)
void | depthFunc (gl::GLenum func)
void | depthMask (gl::GLboolean flag)
void | depthRange (gl::GLdouble nearVal, gl::GLdouble farVal)
void | depthRange (gl::GLfloat nearVal, gl::GLfloat farVal)
void | depthRange (const std::array< gl::GLfloat, 2 > &range)
void | frontFace (gl::GLenum winding)
void | logicOp (gl::GLenum opcode)
void | pixelStore (gl::GLenum pname, gl::GLboolean param)
void | pixelStore (gl::GLenum pname, gl::GLint param)
void | pixelStore (gl::GLenum pname, gl::GLfloat param)
void | pointParameter (gl::GLenum pname, gl::GLenum param)
void | pointSize (gl::GLfloat size)
void | polygonMode (gl::GLenum face, gl::GLenum mode)
void | polygonOffset (gl::GLfloat factor, gl::GLfloat units)
void | primitiveRestartIndex (gl::GLuint index)
void | provokingVertex (gl::GLenum provokeMode)
void | sampleCoverage (gl::GLfloat value, gl::GLboolean invert)
void | scissor (gl::GLint x, gl::GLint y, gl::GLsizei width, gl::GLsizei height)
void | scissor (const std::array< gl::GLint, 4 > &scissorBox)
void | stencilFunc (gl::GLenum func, gl::GLint ref, gl::GLuint mask)
void | stencilMask (gl::GLuint mask)
void | stencilOp (gl::GLenum stencilFail, gl::GLenum depthFail, gl::GLenum depthPass)
void | stencilFuncSeparate (gl::GLenum face, gl::GLenum func, gl::GLint ref, gl::GLuint mask)
void | stencilMaskSeparate (gl::GLenum face, gl::GLuint mask)
void | stencilOpSeparate (gl::GLenum face, gl::GLenum stencilFail, gl::GLenum depthFail, gl::GLenum depthPass)
template<typename... Arguments>
void | set (void(*function)(Arguments...), Arguments... arguments)
Public Member Functions inherited from globjects::Referenced
| Referenced ()
void | ref () const
void | unref () const
int | refCounter () const
Public Member Functions inherited from globjects::HeapOnly
| HeapOnly ()
void | destroy () const

## Static Public Member Functions

static State * | currentState ()

## Protected Member Functions

void | addCapability (Capability *capability)
Capability * | getCapability (gl::GLenum capability)
const Capability * | getCapability (gl::GLenum capability) const
virtual | ~State ()
Protected Member Functions inherited from globjects::Referenced
virtual | ~Referenced ()
Protected Member Functions inherited from globjects::HeapOnly
virtual | ~HeapOnly ()

## Protected Attributes

Mode | m_mode
std::unordered_map< gl::GLenum, Capability * > | m_capabilities
std::unordered_map< StateSettingType, StateSetting * > | m_settings

## Member Enumeration Documentation

## Mode

enum globjects::State::Mode

Enumerator
DeferredMode |
ImmediateMode |

## Constructor & Destructor Documentation

## State()

globjects::State::State | ( | Mode | = `ImmediateMode` | ) |

## ~State()

virtual globjects::State::~State | ( |  | ) |

protected virtual

## Member Function Documentation

## currentState()

static State* globjects::State::currentState | ( |  | ) |

static

## setMode()

void globjects::State::setMode | ( | Mode | mode | ) |

## mode()

Mode globjects::State::mode | ( |  | ) | const

## apply()

void globjects::State::apply | ( |  | ) |

## enable() [1/2]

virtual void globjects::State::enable | ( | gl::GLenum | capability | ) |

override virtual

Implements globjects::AbstractState.

## disable() [1/2]

virtual void globjects::State::disable | ( | gl::GLenum | capability | ) |

override virtual

Implements globjects::AbstractState.

## isEnabled() [1/2]

virtual bool globjects::State::isEnabled | ( | gl::GLenum | capability | ) | const

override virtual

Implements globjects::AbstractState.

## enable() [2/2]

virtual void globjects::State::enable | ( | gl::GLenum | capability,
|  | int | index
| ) |  |

override virtual

Implements globjects::AbstractState.

## disable() [2/2]

virtual void globjects::State::disable | ( | gl::GLenum | capability,
|  | int | index
| ) |  |

override virtual

Implements globjects::AbstractState.

## isEnabled() [2/2]

virtual bool globjects::State::isEnabled | ( | gl::GLenum | capability,
|  | int | index
| ) |  | const

override virtual

Implements globjects::AbstractState.

## add()

virtual void globjects::State::add | ( | StateSetting * | setting | ) |

override virtual

Implements globjects::AbstractState.

## capability() [1/2]

Capability* globjects::State::capability | ( | gl::GLenum | capability | ) |

## capability() [2/2]

const Capability* globjects::State::capability | ( | gl::GLenum | capability | ) | const

## capabilities()

std::vector<Capability *> globjects::State::capabilities | ( |  | ) | const

## setting() [1/2]

StateSetting* globjects::State::setting | ( | const StateSettingType & | type | ) |

## setting() [2/2]

const StateSetting* globjects::State::setting | ( | const StateSettingType & | type | ) | const

## settings() [1/2]

std::vector<StateSetting *> globjects::State::settings | ( |  | ) |

## settings() [2/2]

std::vector<const StateSetting *> globjects::State::settings | ( |  | ) | const

## addCapability()

void globjects::State::addCapability | ( | Capability * | capability | ) |

protected

## getCapability() [1/2]

Capability* globjects::State::getCapability | ( | gl::GLenum | capability | ) |

protected

## getCapability() [2/2]

const Capability* globjects::State::getCapability | ( | gl::GLenum | capability | ) | const

protected

## Member Data Documentation

## m_mode

Mode globjects::State::m_mode

protected

## m_capabilities

std::unordered_map<gl::GLenum, Capability *> globjects::State::m_capabilities

protected

## m_settings

std::unordered_map<StateSettingType, StateSetting *> globjects::State::m_settings

protected

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

- State.h