OpenGL render state value container. More...
#include <kanzi/rendering/gl_render_state_value_container.hpp>
Public Member Functions | |
GlRenderStateValueContainer () | |
Empty constructor. More... | |
void | clear () |
Clear all contents. More... | |
void | clearDirtyFlag (size_t handle) |
Clear dirty flag. More... | |
void | setDirtyFlag (size_t handle) |
Set dirty flag. More... | |
bool | isValid (size_t handle) |
Tell if an uniform for a handle is valid. More... | |
size_t | getHandle (string_view name, int location) |
Add a new value slot, get handle. More... | |
string_view | getName (size_t handle) |
Get name (for handle). More... | |
int | getUniformLocation (size_t handle) const |
Get uniform location (for handle). More... | |
void | setUniformLocation (size_t handle, int uniformLocation) |
Set uniform locaton (for handle). More... | |
T | getValue (size_t handle) const |
Get value (from a handle). More... | |
T | getValueAndClearDirtyFlag (size_t handle) |
Get value (from a handle). More... | |
void | setValue (size_t handle, T value) |
Set value on handle. More... | |
bool | isDirty (size_t handle) const |
Tell if given handle is dirty. More... | |
size_t | size () const |
Get current size. More... | |
OpenGL render state value container.
|
inlineexplicit |
Empty constructor.
|
inline |
Clear all contents.
|
inline |
Clear dirty flag.
handle | Handle to clear. |
|
inline |
Set dirty flag.
handle | Handle to set. |
|
inline |
Tell if an uniform for a handle is valid.
Not all handles link to valid uniform locations, the uniform ID may be invalid.
handle | Handle to check. |
|
inline |
Add a new value slot, get handle.
If handle already exists for given name, it will be returned instead.
name | Name of value. |
location | Uniform location. |
|
inline |
Get name (for handle).
handle | Handle. |
|
inline |
|
inline |
Set uniform locaton (for handle).
handle | Handle. |
uniformLocation | New uniform location. |
|
inline |
Get value (from a handle).
handle | Handle. |
|
inline |
Get value (from a handle).
Implicitly clears dirty flag.
handle | Handle. |
|
inline |
Set value on handle.
handle | Handle. |
value | Value to set. |
|
inline |
Tell if given handle is dirty.
handle | Handle to check. |
|
inline |
Get current size.