The IConstantBufferContainer property interface. More...
#include "murl_graph_i_constant_buffer_container.h"
Public Member Functions | |
virtual SInt32 | AddConstantBuffer (IEnums::ConstantBufferItem item)=0 |
Add a constant buffer with predefined semantics. More... | |
virtual SInt32 | AddConstantBuffer (const String &name)=0 |
Add a constant buffer with custom semantics. More... | |
virtual SInt32 | GetConstantBufferIndex (IEnums::ConstantBufferItem item) const =0 |
Query the location of a predefined constant buffer in the container. More... | |
virtual SInt32 | GetConstantBufferIndex (const String &name) const =0 |
Query the location of a constant buffer with custom semantics. More... | |
virtual UInt32 | GetNumberOfConstantBuffers () const =0 |
Get the total number of individual constant buffers in the container. More... | |
virtual IEnums::ConstantBufferItem | GetConstantBufferItem (UInt32 index) const =0 |
Query the predefined semantic item of a constant buffer at a given index. More... | |
virtual const String & | GetConstantBufferName (UInt32 index) const =0 |
Query the semantic name of a constant buffer at a given index. More... | |
virtual IConstantBuffer * | GetConstantBuffer (UInt32 index) const =0 |
Get the constant buffer object at a given index. More... | |
Detailed Description
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.
Member Function Documentation
◆ AddConstantBuffer() [1/2]
|
pure virtual |
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]
|
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]
|
pure virtual |
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]
|
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()
|
pure virtual |
Get the total number of individual constant buffers in the container.
- Returns
- The total number of buffers added.
◆ GetConstantBufferItem()
|
pure virtual |
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()
|
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()
|
pure virtual |
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