Kanzi  3.9.6
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

unsigned int 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, unsigned int 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

◆ RenderValueInfo() [1/2]

kanzi::GlRenderState::RenderValueInfo::RenderValueInfo ( size_t  index,
PropertyDataType  type,
unsigned int  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.

◆ 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()

unsigned int kanzi::GlRenderState::RenderValueInfo::getElementCount ( ) const
inline

Gets the number of elements in this render value.

Returns
Number of elements.

◆ 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/9]

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/10]

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/9]

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

getValuePointer() specialization.

◆ getValuePointer() [3/9]

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

getValuePointer() specialization.

◆ getValuePointer() [4/9]

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

getValuePointer() specialization.

◆ getValuePointer() [5/9]

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

getValuePointer() specialization.

◆ getValuePointer() [6/9]

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

getValuePointer() specialization.

◆ getValuePointer() [7/9]

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

getValuePointer() specialization.

◆ getValuePointer() [8/9]

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

getValuePointer() specialization.

◆ getValuePointer() [9/9]

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

getValuePointer() specialization.

◆ getValue() [2/10]

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

getValue() specialization.

◆ getValue() [3/10]

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

getValue() specialization.

◆ getValue() [4/10]

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

getValue() specialization.

◆ getValue() [5/10]

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

getValue() specialization.

◆ getValue() [6/10]

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

getValue() specialization.

◆ getValue() [7/10]

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

getValue() specialization.

◆ getValue() [8/10]

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

getValue() specialization.

◆ getValue() [9/10]

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

getValue() specialization.

◆ getValue() [10/10]

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: