![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
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.
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.
Integer AddConstantBuffer(Murl.IEnums.ConstantBufferItem item)
item | The predefined constant buffer item to add. |
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.
Integer AddConstantBuffer(String name)
name | The custom semantic name. |
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.
Integer GetConstantBufferIndex(Murl.IEnums.ConstantBufferItem item)
item | The predefined constant buffer item to query. |
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.
Integer GetConstantBufferIndex(String name)
name | The custom semantic name. |
Get the total number of individual constant buffers in the container.
Integer GetNumberOfConstantBuffers()
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.
Murl.IEnums.ConstantBufferItem GetConstantBufferItem(Integer index)
index | The zero-based index of the buffer to query. |
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.
String GetConstantBufferName(Integer index)
index | The zero-based index of the buffer to query. |
Get the constant buffer object at a given index.
Murl.Graph.IConstantBuffer GetConstantBuffer(Integer index)
index | The zero-based index of the buffer to retrieve. |