Kanzi 4.0.0-beta2
kanzi::ShaderProgram::UniformProperty Struct Reference

Description of a Shader Uniform. More...

#include <kanzi/core.ui/graphics3d/shader.hpp>

Public Member Functions

 UniformProperty ()=default
 Constructor.
 
 UniformProperty (const string_view &name, PropertyDataType dataType, unsigned int elementCount, optional< AbstractPropertyType > propertyType, UniformBindingType bindingType, optional< FixedUniform > fixedOperation, FixedUniformFunction func, UniformTransformation transformation)
 Constructor for generic render values.
 
 UniformProperty (string_view name, PropertyDataType dataType, unsigned int elementCount, optional< AbstractPropertyType > propertyType, UniformBindingType bindingType, optional< FixedUniform > fixedOperation, FixedUniformFunction func, UniformTransformation transformation, uint16_t uboIndex, uint16_t offset, uint16_t size)
 Constructor for generic render values.
 

Public Attributes

UniformBindingType bindingAssociation
 The type of binding associated with the uniform.
 
PropertyDataType dataType
 Uniform data type.
 
unsigned int elementCount
 Uniform element count.
 
FixedUniformFunction fixedFunction
 Corresponding function pointer.
 
optional< FixedUniformfixedOperation
 Corresponding fixed uniform.
 
string name
 Name of the uniform.
 
uint16_t offset
 Uniform Buffer Offset.
 
optional< AbstractPropertyTypepropertyType
 Corresponding property type.
 
uint16_t size
 Size in bytes.
 
UniformTransformation transformation
 Uniform transformation.
 
uint16_t uboIndex
 Uniform Buffer Index.
 

Detailed Description

Description of a Shader Uniform.

Since
Kanzi 4.0.0

Constructor & Destructor Documentation

◆ UniformProperty() [1/3]

kanzi::ShaderProgram::UniformProperty::UniformProperty ( )
explicitdefault

Constructor.

◆ UniformProperty() [2/3]

kanzi::ShaderProgram::UniformProperty::UniformProperty ( const string_view & name,
PropertyDataType dataType,
unsigned int elementCount,
optional< AbstractPropertyType > propertyType,
UniformBindingType bindingType,
optional< FixedUniform > fixedOperation,
FixedUniformFunction func,
UniformTransformation transformation )
inlineexplicit

Constructor for generic render values.

There may be a binding for this value or the value may be set manually.

Parameters
nameRender value name.
dataTypeUniform data type.
elementCountNumber of elements in the uniform.
propertyTypeProperty type corresponding with the Render value. Can be nullopt.
bindingTypeThe type of binding associated with the uniform.
fixedOperationFixed uniform identifier.
funcPotential function pointer to use.
transformationUniform transformation.

◆ UniformProperty() [3/3]

kanzi::ShaderProgram::UniformProperty::UniformProperty ( string_view name,
PropertyDataType dataType,
unsigned int elementCount,
optional< AbstractPropertyType > propertyType,
UniformBindingType bindingType,
optional< FixedUniform > fixedOperation,
FixedUniformFunction func,
UniformTransformation transformation,
uint16_t uboIndex,
uint16_t offset,
uint16_t size )
inlineexplicit

Constructor for generic render values.

There may be a binding for this value or the value may be set manually.

Parameters
nameRender value name.
dataTypeUniform data type.
elementCountNumber of elements in the uniform.
propertyTypeProperty type corresponding with the Render value. Can be nullopt.
bindingTypeThe type of binding associated with the uniform.
fixedOperationFixed uniform identifier.
funcPotential function pointer to use.
transformationUniform transformation.
uboIndexUniform Buffer Object index.
offsetOffset in bytes within the Uniform Buffer Object.
sizeSize of the property in bytes.

Member Data Documentation

◆ name

string kanzi::ShaderProgram::UniformProperty::name

Name of the uniform.

This corresponds with the unqualified name of the property type if a property type is set.

◆ dataType

PropertyDataType kanzi::ShaderProgram::UniformProperty::dataType

Uniform data type.

◆ elementCount

unsigned int kanzi::ShaderProgram::UniformProperty::elementCount

Uniform element count.

Usually 1, but can be more for uniforms with arrays.

◆ propertyType

optional<AbstractPropertyType> kanzi::ShaderProgram::UniformProperty::propertyType

Corresponding property type.

Can be nullopt.

◆ bindingAssociation

UniformBindingType kanzi::ShaderProgram::UniformProperty::bindingAssociation

The type of binding associated with the uniform.

Uniforms may associate with a manually defined binding contained in the regular binding set. If manual binding is not present, the binding association may instruct to create a default binding.

◆ fixedOperation

optional<FixedUniform> kanzi::ShaderProgram::UniformProperty::fixedOperation

Corresponding fixed uniform.

Can be nullopt.

◆ fixedFunction

FixedUniformFunction kanzi::ShaderProgram::UniformProperty::fixedFunction

Corresponding function pointer.

Can be nullptr.

◆ transformation

UniformTransformation kanzi::ShaderProgram::UniformProperty::transformation

Uniform transformation.

◆ uboIndex

uint16_t kanzi::ShaderProgram::UniformProperty::uboIndex

Uniform Buffer Index.

◆ offset

uint16_t kanzi::ShaderProgram::UniformProperty::offset

Uniform Buffer Offset.

◆ size

uint16_t kanzi::ShaderProgram::UniformProperty::size

Size in bytes.


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