The IConstantBufferParameter graph node interface. More...
#include "murl_graph_i_constant_buffer_parameter.h"
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... | |
Public Member Functions inherited from Murl::Graph::IUniform | |
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... | |
Detailed Description
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.
Member Function Documentation
◆ GetNodeInterface() [1/2]
|
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.
- Returns
- The mutable Graph::INode interface, or null if not available
◆ GetNodeInterface() [2/2]
|
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.
- Returns
- The constant Graph::INode interface, or null if not available
◆ GetParentConstantBufferParameterNodeTarget() [1/2]
|
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.
- Returns
- The mutable Graph::IConstantBufferParameter parent container, or null if not available.
◆ GetParentConstantBufferParameterNodeTarget() [2/2]
|
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.
- Returns
- The constant Graph::IConstantBufferParameter parent container, or null if not available.
◆ SetName()
Set the actual uniform variable name.
Once initialized, the variable name cannot be changed.
- Parameters
-
name The uniform name.
- Returns
- true if successful.
◆ SetOperation()
|
pure virtual |
Set the arithmetic operation for modulating the optional parent's value.
- Parameters
-
operation The modulation operation.
- Returns
- true if successful.
◆ SetValue() [1/2]
Set the actual parameter value(s) by string.
Sets the modified state to true if successful.
- Parameters
-
value The value(s) in string representation.
- Returns
- true if successful.
◆ SetValue() [2/2]
|
pure virtual |
Set an actual parameter value by string and index.
Sets the modified state to true if successful.
- Parameters
-
value The value in string representation. index The zero-based index to the value.
- Returns
- true if successful.
◆ SetFloatValue()
|
pure virtual |
Set an actual float parameter value.
Sets the modified state to true if successful.
- Parameters
-
value The value. index The zero-based index to the value.
- Returns
- true if successful.
◆ SetSInt32Value()
|
pure virtual |
Set an actual integer parameter value.
Sets the modified state to true if successful.
- Parameters
-
value The value. index The zero-based index to the value.
- Returns
- true if successful.
◆ GetFloatValue()
|
pure virtual |
Get an actual float parameter value.
- Parameters
-
index The zero-based index to the value.
- Returns
- The value.
◆ GetSInt32Value()
|
pure virtual |
Get an actual integer parameter value.
- Parameters
-
index The zero-based index to the value.
- Returns
- The value.
◆ GetModulatedFloatValue()
|
pure virtual |
Get an actual modulated float parameter value.
- Parameters
-
index The zero-based index to the value.
- Returns
- The modulated value.
◆ GetModulatedSInt32Value()
|
pure virtual |
Get an actual modulated integer parameter value.
- Parameters
-
index The zero-based index to the value.
- Returns
- The modulated value.
◆ GetData() [1/2]
|
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.
- Returns
- The mutable pointer.
◆ GetData() [2/2]
|
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.
- Returns
- The constant pointer.
◆ GetModulatedData() [1/2]
|
pure virtual |
Get a mutable pointer to the parent's parameter value modulated by the actual value.
See GetData().
- Returns
- The mutable pointer.
◆ GetModulatedData() [2/2]
|
pure virtual |
Get a constant pointer to the parent's parameter value modulated by the actual value.
See GetData().
- Returns
- The constant pointer.
◆ SetValueModified()
|
pure virtual |
Set the modified state of the parameter value.
- Parameters
-
isModified The modified state.
- Returns
- true if successful.
◆ IsValueModified()
|
pure virtual |
Query the modified state of the parameter value.
- Returns
- The modified state.
◆ UpdateValue()
|
pure virtual |
Apply the parameter's modulated value to a given block of data.
- Parameters
-
targetData A pointer to the target memory block.
- Returns
- true if successful.
The documentation for this interface was generated from the following file:
- murl_graph_i_constant_buffer_parameter.h