Kanzi 3.9.10
kanzi::GlRenderState::RenderValueInfo Class Reference

Render value information. More...

#include <kanzi/core.ui/platform/graphics_backend/gl/gl_render_state.hpp>

Inheritance diagram for kanzi::GlRenderState::RenderValueInfo:
[legend]

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 TgetValuePointer (const RenderValueUnion *valueArray) const
 Converts a value array to given pointer value.
 
template<>
const intgetValuePointer (const RenderValueUnion *valueArray) const
 getValuePointer() specialization.
 
bool matches (PropertyDataType type, string_view name) const
 Tells if this render value info matches given parameters.
 
RenderValueInfooperator= (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 chargetName () 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.
 
GlRenderValueBaseoperator= (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.
 

Detailed Description

Render value information.

Points to the render value union array.

Constructor & Destructor Documentation

◆ RenderValueInfo() [1/2]

kanzi::GlRenderState::RenderValueInfo::RenderValueInfo ( size_t index,
PropertyDataType type,
size_t elementCount,
int uniformLocation,
string_view name )
inlineexplicit

Constructor.

Parameters
indexIndex into the value array.
typeData type of the value.
elementCountNumber of elements associated with this render value.
uniformLocationUniform location.
nameName of the uniform.
Since
Kanzi 3.9.7 changed the type of the elementCount parameter to size_t.

◆ RenderValueInfo() [2/2]

kanzi::GlRenderState::RenderValueInfo::RenderValueInfo ( RenderValueInfo && other)
default

Move constructor.

Parameters
otherSource object.

Member Function Documentation

◆ matches()

bool kanzi::GlRenderState::RenderValueInfo::matches ( PropertyDataType type,
string_view name ) const
inline

Tells if this render value info matches given parameters.

Returns
True if matches name and type, otherwise false.

◆ getType()

PropertyDataType kanzi::GlRenderState::RenderValueInfo::getType ( ) const
inline

Gets the property type of the render value.

Returns
Type of this render value.

◆ getElementCount()

size_t kanzi::GlRenderState::RenderValueInfo::getElementCount ( ) const
inline

Gets the number of elements in this render value.

Returns
Number of elements.
Since
Kanzi 3.9.7 changed the type of the return value to size_t.

◆ getValueIndex()

size_t kanzi::GlRenderState::RenderValueInfo::getValueIndex ( ) const
inline

Gets the value index.

Returns
Index into value array.

◆ update()

void kanzi::GlRenderState::RenderValueInfo::update ( Renderer & renderer,
const RenderValueUnion * valueArray )

Update this render value to renderer.

Parameters
rendererRenderer to use.
valueArrayPointer to render value array.

◆ operator=()

RenderValueInfo & kanzi::GlRenderState::RenderValueInfo::operator= ( RenderValueInfo && other)
default

Move operator.

Parameters
otherSource object.
Returns
This.

◆ getValuePointer() [1/2]

template<typename T >
const T * kanzi::GlRenderState::RenderValueInfo::getValuePointer ( const RenderValueUnion * valueArray) const

Converts a value array to given pointer value.

Parameters
valueArrayThe render state value array.
Returns
Pointer to value array cast as correct type.

◆ getValue() [1/2]

template<typename T >
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.

Parameters
valueArrayThe render state value array.
indexIndex of the value. The index must be smaller than element count of the render value.
Returns
Value extracted from correct place in the value array.

◆ getValuePointer() [2/2]

const Matrix4x4 * kanzi::GlRenderState::RenderValueInfo::getValuePointer ( const RenderValueUnion * valueArray) const

getValuePointer() specialization.

◆ getValue() [2/2]

Matrix4x4 kanzi::GlRenderState::RenderValueInfo::getValue ( const RenderValueUnion * valueArray,
size_t index ) const

getValue() specialization.


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