Kanzi  3.9.7
Kanzi Engine API
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. More...
 
PropertyDataType getType () const
 Gets the property type of the render value. More...
 
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. More...
 
template<>
bool getValue (const RenderValueUnion *valueArray, size_t index) const
 getValue() specialization. More...
 
template<>
int getValue (const RenderValueUnion *valueArray, size_t index) const
 getValue() specialization. More...
 
template<>
float getValue (const RenderValueUnion *valueArray, size_t index) const
 getValue() specialization. More...
 
template<>
ColorRGBA getValue (const RenderValueUnion *valueArray, size_t index) const
 getValue() specialization. More...
 
template<>
Vector2 getValue (const RenderValueUnion *valueArray, size_t index) const
 getValue() specialization. More...
 
template<>
Vector3 getValue (const RenderValueUnion *valueArray, size_t index) const
 getValue() specialization. More...
 
template<>
Vector4 getValue (const RenderValueUnion *valueArray, size_t index) const
 getValue() specialization. More...
 
template<>
Matrix3x3 getValue (const RenderValueUnion *valueArray, size_t index) const
 getValue() specialization. More...
 
template<>
Matrix4x4 getValue (const RenderValueUnion *valueArray, size_t index) const
 getValue() specialization. More...
 
size_t getValueIndex () const
 Gets the value index. More...
 
template<typename T >
const TgetValuePointer (const RenderValueUnion *valueArray) const
 Converts a value array to given pointer value. More...
 
template<>
const int * getValuePointer (const RenderValueUnion *valueArray) const
 getValuePointer() specialization. More...
 
template<>
const float * getValuePointer (const RenderValueUnion *valueArray) const
 getValuePointer() specialization. More...
 
template<>
const ColorRGBAgetValuePointer (const RenderValueUnion *valueArray) const
 getValuePointer() specialization. More...
 
template<>
const Vector2getValuePointer (const RenderValueUnion *valueArray) const
 getValuePointer() specialization. More...
 
template<>
const Vector3getValuePointer (const RenderValueUnion *valueArray) const
 getValuePointer() specialization. More...
 
template<>
const Vector4getValuePointer (const RenderValueUnion *valueArray) const
 getValuePointer() specialization. More...
 
template<>
const Matrix3x3getValuePointer (const RenderValueUnion *valueArray) const
 getValuePointer() specialization. More...
 
template<>
const Matrix4x4getValuePointer (const RenderValueUnion *valueArray) const
 getValuePointer() specialization. More...
 
bool matches (PropertyDataType type, string_view name) const
 Tells if this render value info matches given parameters. More...
 
RenderValueInfooperator= (RenderValueInfo &&other)=default
 Move operator. More...
 
 RenderValueInfo (size_t index, PropertyDataType type, size_t elementCount, int uniformLocation, string_view name)
 Constructor. More...
 
 RenderValueInfo (RenderValueInfo &&other)=default
 Move constructor. More...
 
void update (Renderer &renderer, const RenderValueUnion *valueArray)
 Update this render value to renderer. More...
 
- Public Member Functions inherited from kanzi::GlRenderValueBase
const char * getName () const
 Access name. More...
 
int getUniformLocation () const
 Gets uniform location. More...
 
 GlRenderValueBase ()=default
 Constructor. More...
 
 GlRenderValueBase (Material &material, string_view name)
 Constructor. More...
 
 GlRenderValueBase (int uniformLocation, string_view name)
 Constructor. More...
 
 GlRenderValueBase (GlRenderValueBase &&other)=default
 Move constructor. More...
 
bool isDirty () const
 Tells if this value is dirty. More...
 
bool isNamed (string_view name) const
 Tells if the render value has given name. More...
 
bool isValid () const
 Tells if this value information is valid. More...
 
GlRenderValueBaseoperator= (GlRenderValueBase &&other)=default
 Move operator. More...
 
void setDirty (bool enabled)
 Sets dirty status. More...
 
void setUniformLocation (int uniformLocation)
 Sets uniform location. More...
 

Additional Inherited Members

- Protected Attributes inherited from kanzi::GlRenderValueBase
bool m_dirty
 Is this value dirty and needs updating? More...
 
ImmutableString m_name
 Name of the render value. More...
 
int m_uniformLocation
 Uniform location. More...
 

Detailed Description

Render value information.

Points to the render value union array.

Constructor & Destructor Documentation

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.
kanzi::GlRenderState::RenderValueInfo::RenderValueInfo ( RenderValueInfo &&  other)
default

Move constructor.

Parameters
otherSource object.

Member Function Documentation

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.
PropertyDataType kanzi::GlRenderState::RenderValueInfo::getType ( ) const
inline

Gets the property type of the render value.

Returns
Type of this render value.
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.
size_t kanzi::GlRenderState::RenderValueInfo::getValueIndex ( ) const
inline

Gets the value index.

Returns
Index into value array.
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.
RenderValueInfo& kanzi::GlRenderState::RenderValueInfo::operator= ( RenderValueInfo &&  other)
default

Move operator.

Parameters
otherSource object.
Returns
This.
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.
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.
template<>
const int* kanzi::GlRenderState::RenderValueInfo::getValuePointer ( const RenderValueUnion valueArray) const

getValuePointer() specialization.

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

getValuePointer() specialization.

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

getValuePointer() specialization.

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

getValuePointer() specialization.

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

getValuePointer() specialization.

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

getValuePointer() specialization.

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

getValuePointer() specialization.

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

getValuePointer() specialization.

template<>
bool kanzi::GlRenderState::RenderValueInfo::getValue ( const RenderValueUnion valueArray,
size_t  index 
) const

getValue() specialization.

template<>
int kanzi::GlRenderState::RenderValueInfo::getValue ( const RenderValueUnion valueArray,
size_t  index 
) const

getValue() specialization.

template<>
float kanzi::GlRenderState::RenderValueInfo::getValue ( const RenderValueUnion valueArray,
size_t  index 
) const

getValue() specialization.

template<>
ColorRGBA kanzi::GlRenderState::RenderValueInfo::getValue ( const RenderValueUnion valueArray,
size_t  index 
) const

getValue() specialization.

template<>
Vector2 kanzi::GlRenderState::RenderValueInfo::getValue ( const RenderValueUnion valueArray,
size_t  index 
) const

getValue() specialization.

template<>
Vector3 kanzi::GlRenderState::RenderValueInfo::getValue ( const RenderValueUnion valueArray,
size_t  index 
) const

getValue() specialization.

template<>
Vector4 kanzi::GlRenderState::RenderValueInfo::getValue ( const RenderValueUnion valueArray,
size_t  index 
) const

getValue() specialization.

template<>
Matrix3x3 kanzi::GlRenderState::RenderValueInfo::getValue ( const RenderValueUnion valueArray,
size_t  index 
) const

getValue() specialization.

template<>
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: