The IConstantBufferContainer property interface.
More...
#include <murl_graph_i_constant_buffer_container.h>
The IConstantBufferContainer property interface.
This interface provides a way to manage multiple individual constant buffer objects, which each of them holdin a set of different shader variables.
◆ AddConstantBuffer() [1/2]
Add a constant buffer with predefined semantics.
This method creates and adds a constant buffer to the container, using one of the available predefined semantics defined in IEnums::ConstantBufferItem. If successful, this method returns the zero-based index of the newly created constant buffer within the container; if failed, -1 is returned.
- Parameters
-
item | The predefined constant buffer item to add. |
- Returns
- The zero-based index of the buffer in the container, or -1 if failed.
◆ AddConstantBuffer() [2/2]
virtual SInt32 Murl::Graph::IConstantBufferContainer::AddConstantBuffer |
( |
const String & |
name | ) |
|
|
pure virtual |
Add a constant buffer with custom semantics.
This method creates and adds a constant buffer to the container, using custom semantics defined via a unique name. If successful, this method returns the zero-based index of the newly created constant buffer within the container; if failed, -1 is returned.
- Parameters
-
name | The custom semantic name. |
- Returns
- The zero-based index of the buffer in the container, or -1 if failed.
◆ GetConstantBufferIndex() [1/2]
Query the location of a predefined constant buffer in the container.
This method can be used to query the zero-based index of a constant buffer with given predefined semantics. If the container does not hold a buffer with the requested semantics, -1 is returned.
- Parameters
-
item | The predefined constant buffer item to query. |
- Returns
- The zero-based index of the buffer, or -1 if not found.
◆ GetConstantBufferIndex() [2/2]
virtual SInt32 Murl::Graph::IConstantBufferContainer::GetConstantBufferIndex |
( |
const String & |
name | ) |
const |
|
pure virtual |
Query the location of a constant buffer with custom semantics.
This method can be used to query the zero-based index of a constant buffer with given user-defined semantics. If the container does not hold a buffer with the requested semantics, -1 is returned.
- Parameters
-
name | The custom semantic name. |
- Returns
- The zero-based index of the buffer, or -1 if not found.
◆ GetNumberOfConstantBuffers()
virtual UInt32 Murl::Graph::IConstantBufferContainer::GetNumberOfConstantBuffers |
( |
| ) |
const |
|
pure virtual |
Get the total number of individual constant buffers in the container.
- Returns
- The total number of buffers added.
◆ GetConstantBufferItem()
Query the predefined semantic item of a constant buffer at a given index.
If the buffer at the given index represents has predefined semantics, this method returns the actual item, e.g. IEnums::CONSTANT_BUFFER_ITEM_MATERIAL for a material- related buffer. If the buffer is a user-defined one, it returns IEnums::CONSTANT_BUFFER_ITEM_CUSTOM.
- Parameters
-
index | The zero-based index of the buffer to query. |
- Returns
- The predefined constant buffer semantics item.
◆ GetConstantBufferName()
virtual const String& Murl::Graph::IConstantBufferContainer::GetConstantBufferName |
( |
UInt32 |
index | ) |
const |
|
pure virtual |
Query the semantic name of a constant buffer at a given index.
If the buffer at the given index has user-defined semantics, this method returns its actual name string. If it has predefined semantics, an empty string is returned.
- Parameters
-
index | The zero-based index of the buffer to query. |
- Returns
- The user-defined constant buffer semantics item.
◆ GetConstantBuffer()
Get the constant buffer object at a given index.
- Parameters
-
index | The zero-based index of the buffer to retrieve. |
- Returns
- The constant buffer object.
The documentation for this interface was generated from the following file:
- murl_graph_i_constant_buffer_container.h