Render value information. More...
#include <kanzi/core.ui/platform/graphics_backend/gl/gl_render_state.hpp>
Public Member Functions | |
size_t | getElementCount () const |
Gets the number of elements in this render value. | |
PropertyDataType | getType () const |
Gets the property type of the render value. | |
template<typename T > | |
T | getValue (const RenderValueUnion *valueArray, size_t index) const |
Converts a value from a value array into a value that can be uploaded into the renderer. | |
template<> | |
bool | getValue (const RenderValueUnion *valueArray, size_t index) const |
getValue() specialization. | |
size_t | getValueIndex () const |
Gets the value index. | |
template<typename T > | |
const T * | getValuePointer (const RenderValueUnion *valueArray) const |
Converts a value array to given pointer value. | |
template<> | |
const int * | getValuePointer (const RenderValueUnion *valueArray) const |
getValuePointer() specialization. | |
bool | matches (PropertyDataType type, string_view name) const |
Tells if this render value info matches given parameters. | |
RenderValueInfo & | operator= (RenderValueInfo &&other)=default |
Move operator. | |
RenderValueInfo (RenderValueInfo &&other)=default | |
Move constructor. | |
RenderValueInfo (size_t index, PropertyDataType type, size_t elementCount, int uniformLocation, string_view name) | |
Constructor. | |
void | update (Renderer &renderer, const RenderValueUnion *valueArray) |
Update this render value to renderer. | |
Public Member Functions inherited from kanzi::GlRenderValueBase | |
const char * | getName () const |
Access name. | |
int | getUniformLocation () const |
Gets uniform location. | |
GlRenderValueBase ()=default | |
Constructor. | |
GlRenderValueBase (GlRenderValueBase &&other)=default | |
Move constructor. | |
GlRenderValueBase (int uniformLocation, string_view name) | |
Constructor. | |
GlRenderValueBase (Material &material, string_view name) | |
Constructor. | |
bool | isDirty () const |
Tells if this value is dirty. | |
bool | isNamed (string_view name) const |
Tells if the render value has given name. | |
bool | isValid () const |
Tells if this value information is valid. | |
GlRenderValueBase & | operator= (GlRenderValueBase &&other)=default |
Move operator. | |
void | setDirty (bool enabled) |
Sets dirty status. | |
void | setUniformLocation (int uniformLocation) |
Sets uniform location. | |
Additional Inherited Members | |
Protected Attributes inherited from kanzi::GlRenderValueBase | |
bool | m_dirty |
Is this value dirty and needs updating? | |
ImmutableString | m_name |
Name of the render value. | |
int | m_uniformLocation |
Uniform location. | |
Render value information.
Points to the render value union array.
|
inlineexplicit |
Constructor.
index | Index into the value array. |
type | Data type of the value. |
elementCount | Number of elements associated with this render value. |
uniformLocation | Uniform location. |
name | Name of the uniform. |
elementCount
parameter to size_t.
|
default |
Move constructor.
other | Source object. |
|
inline |
Tells if this render value info matches given parameters.
|
inline |
Gets the property type of the render value.
|
inline |
Gets the number of elements in this render value.
|
inline |
Gets the value index.
void kanzi::GlRenderState::RenderValueInfo::update | ( | Renderer & | renderer, |
const RenderValueUnion * | valueArray ) |
Update this render value to renderer.
renderer | Renderer to use. |
valueArray | Pointer to render value array. |
|
default |
Move operator.
other | Source object. |
const T * kanzi::GlRenderState::RenderValueInfo::getValuePointer | ( | const RenderValueUnion * | valueArray | ) | const |
Converts a value array to given pointer value.
valueArray | The render state value array. |
T kanzi::GlRenderState::RenderValueInfo::getValue | ( | const RenderValueUnion * | valueArray, |
size_t | index ) const |
Converts a value from a value array into a value that can be uploaded into the renderer.
valueArray | The render state value array. |
index | Index of the value. The index must be smaller than element count of the render value. |
const Matrix4x4 * kanzi::GlRenderState::RenderValueInfo::getValuePointer | ( | const RenderValueUnion * | valueArray | ) | const |
getValuePointer() specialization.
Matrix4x4 kanzi::GlRenderState::RenderValueInfo::getValue | ( | const RenderValueUnion * | valueArray, |
size_t | index ) const |
getValue() specialization.