![]() |
Murl Engine API
Version 2018.3
|
The IConstantBufferParameter graph node interface. More...
#include <murl_graph_i_constant_buffer_parameter.h>
The IConstantBufferParameter graph node interface.
A single constant buffer parameter is used in conjunction with a Graph::IShaderProgram and its referenced Graph::IShader nodes, in order to set the value of a specific custom (or predefined) uniform variable in these GPU shaders.
Each constant buffer parameter is defined by a name and data type matching the name and type of a uniform variable in the shader(s); in addition, it is possible to reference an optional parent parameter whose value can be modulated by a given arithmetic operation such as addition, replacement or multiplication.
Constant buffer parameters must be grouped together in a Graph::IConstantBufferParameterGroup, which in turn must be part of a set of groups in a Graph::IConstantBufferParameters node.
See the Graph::IUniform base interface for accessing actual uniform parameters. See Graph::IConstantBufferParameterGroup for grouping individual parameter nodes. See Graph::IConstantBufferParameters for collecting individual groups.
Public Member Functions | |
virtual INode * | GetNodeInterface ()=0 |
Get the mutable Graph::INode interface. More... | |
virtual const INode * | GetNodeInterface () const =0 |
Get the constant Graph::INode interface. More... | |
virtual IConstantBufferParameterNodeTarget * | GetParentConstantBufferParameterNodeTarget ()=0 |
Get the mutable Graph::IConstantBufferParameter container storing the optional parent. More... | |
virtual const IConstantBufferParameterNodeTarget * | GetParentConstantBufferParameterNodeTarget () const =0 |
Get the constant Graph::IConstantBufferParameter container storing the optional parent. More... | |
virtual Bool | SetName (const String &name)=0 |
Set the actual uniform variable name. More... | |
virtual Bool | SetOperation (IEnums::AluOperation operation)=0 |
Set the arithmetic operation for modulating the optional parent's value. More... | |
virtual Bool | SetValue (const String &value)=0 |
Set the actual parameter value(s) by string. More... | |
virtual Bool | SetValue (const String &value, UInt32 index)=0 |
Set an actual parameter value by string and index. More... | |
virtual Bool | SetFloatValue (Float value, UInt32 index)=0 |
Set an actual float parameter value. More... | |
virtual Bool | SetSInt32Value (SInt32 value, UInt32 index)=0 |
Set an actual integer parameter value. More... | |
virtual Float | GetFloatValue (UInt32 index) const =0 |
Get an actual float parameter value. More... | |
virtual SInt32 | GetSInt32Value (UInt32 index) const =0 |
Get an actual integer parameter value. More... | |
virtual Float | GetModulatedFloatValue (UInt32 index) const =0 |
Get an actual modulated float parameter value. More... | |
virtual SInt32 | GetModulatedSInt32Value (UInt32 index) const =0 |
Get an actual modulated integer parameter value. More... | |
virtual void * | GetData ()=0 |
Get a mutable pointer to the actual parameter value. More... | |
virtual const void * | GetData () const =0 |
Get a constant pointer to the actual parameter value. More... | |
virtual void * | GetModulatedData ()=0 |
Get a mutable pointer to the parent's parameter value modulated by the actual value. More... | |
virtual const void * | GetModulatedData () const =0 |
Get a constant pointer to the parent's parameter value modulated by the actual value. More... | |
virtual Bool | SetValueModified (Bool isModified)=0 |
Set the modified state of the parameter value. More... | |
virtual Bool | IsValueModified () const =0 |
Query the modified state of the parameter value. More... | |
virtual Bool | UpdateValue (void *targetData) const =0 |
Apply the parameter's modulated value to a given block of data. More... | |
![]() | |
virtual SInt32 | GetIndex () const =0 |
Get the zero-based index of this uniform variable. More... | |
virtual const String & | GetName () const =0 |
Get the uniform's user-defined variable name. More... | |
virtual IEnums::UniformItem | GetItem () const =0 |
Get the uniform's predefined item. More... | |
virtual IEnums::UniformType | GetType () const =0 |
Get the uniform's data type. More... | |
virtual UInt32 | GetByteOffset () const =0 |
Get the uniform's byte offset. More... | |
|
pure virtual |
Get the mutable Graph::INode interface.
This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.
|
pure virtual |
Get the constant Graph::INode interface.
This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.
|
pure virtual |
Get the mutable Graph::IConstantBufferParameter container storing the optional parent.
This method returns a mutable pointer to the node's Graph::IConstantBufferParameter container that stores an optional reference to another generic parameter object, to set or query the object's parent.
|
pure virtual |
Get the constant Graph::IConstantBufferParameter container storing the optional parent.
This method returns a constant pointer to the node's Graph::IConstantBufferParameter container that stores an optional reference to another generic parameter object, to query the object's parent.
Set the actual uniform variable name.
Once initialized, the variable name cannot be changed.
name | The uniform name. |
|
pure virtual |
Set the arithmetic operation for modulating the optional parent's value.
operation | The modulation operation. |
Set the actual parameter value(s) by string.
Sets the modified state to true if successful.
value | The value(s) in string representation. |
|
pure virtual |
Set an actual parameter value by string and index.
Sets the modified state to true if successful.
value | The value in string representation. |
index | The zero-based index to the value. |
|
pure virtual |
Set an actual float parameter value.
Sets the modified state to true if successful.
value | The value. |
index | The zero-based index to the value. |
|
pure virtual |
Set an actual integer parameter value.
Sets the modified state to true if successful.
value | The value. |
index | The zero-based index to the value. |
|
pure virtual |
Get an actual float parameter value.
index | The zero-based index to the value. |
|
pure virtual |
Get an actual integer parameter value.
index | The zero-based index to the value. |
|
pure virtual |
Get an actual modulated float parameter value.
index | The zero-based index to the value. |
|
pure virtual |
Get an actual modulated integer parameter value.
index | The zero-based index to the value. |
|
pure virtual |
Get a mutable pointer to the actual parameter value.
Depending on the actual data type, the given pointer must be cast to the corresponding C++ data type, e.g. Float* for IEnums::UNIFORM_TYPE_FLOAT or IEnums::UNIFORM_TYPE_FLOAT_VECTOR_4 etc. Care must be taken to only access the given number of components of that data type.
|
pure virtual |
Get a constant pointer to the actual parameter value.
Depending on the actual data type, the given pointer must be cast to the corresponding C++ data type, e.g. Float* for IEnums::UNIFORM_TYPE_FLOAT or IEnums::UNIFORM_TYPE_FLOAT_VECTOR_4 etc. Care must be taken to only access the given number of components of that data type.
|
pure virtual |
Get a mutable pointer to the parent's parameter value modulated by the actual value.
See GetData().
|
pure virtual |
Get a constant pointer to the parent's parameter value modulated by the actual value.
See GetData().
|
pure virtual |
Set the modified state of the parameter value.
isModified | The modified state. |
|
pure virtual |
Query the modified state of the parameter value.
|
pure virtual |
Apply the parameter's modulated value to a given block of data.
targetData | A pointer to the target memory block. |