![]() |
Murl Engine API
Version 2018.3
|
The IConstantBuffer video object interface. More...
#include <murl_video_i_constant_buffer.h>
The IConstantBuffer video object interface.
This interface represents a buffer containing one or more individual GPU program uniform variables.
Used internally by Graph::FixedParameters and Graph::GenericParameterGroup.
Inherited by Murl::Video::ConstantBuffer.
Public Member Functions | |
virtual IObject * | GetObjectInterface ()=0 |
Get the mutable Video::IObject interface. More... | |
virtual const IObject * | GetObjectInterface () const =0 |
Get the constant Video::IObject interface. More... | |
virtual Bool | Set (IProgram *currentProgram, SInt32 id)=0 |
Attach the constant buffer to the current GPU program. More... | |
virtual Bool | SetAccessMode (IEnums::BufferAccessMode mode)=0 |
Set the access mode hint (read only or read/write). More... | |
virtual IEnums::BufferAccessMode | GetAccessMode () const =0 |
Get the access mode hint. More... | |
virtual Bool | SetConstantData (void *constants, UInt32 maxByteSize)=0 |
Assign a mutable source data storage. More... | |
virtual Bool | SetConstantData (const void *constants, UInt32 maxByteSize)=0 |
Assign a constant source data storage. More... | |
virtual Bool | SetByteSize (UInt32 byteSize)=0 |
Set the actual size of the buffer used. More... | |
virtual Bool | SetConstantsModified ()=0 |
Mark the whole buffer as modified. More... | |
virtual Bool | SetConstantsModified (UInt32 firstConstant, UInt32 numberOfConstants)=0 |
Mark a sub-region of the buffer as modified. More... | |
virtual void * | GetConstantData ()=0 |
Get a pointer to the mutable source data, if available. More... | |
virtual const void * | GetConstantData () const =0 |
Get a constant pointer to the source data. More... | |
virtual void * | GetConstantBufferData ()=0 |
Get a pointer to the actual mutable buffer data. More... | |
virtual const void * | GetConstantBufferData () const =0 |
Get a pointer to the actual constant buffer data. More... | |
virtual UInt32 | GetMaxByteSize () const =0 |
Get the maximum number of bytes the buffer can hold. More... | |
virtual UInt32 | GetByteSize () const =0 |
Get the actual number of buffer bytes used. More... | |
virtual Bool | AreConstantsModified () const =0 |
Check if the buffer contents are modified. More... | |
virtual SInt32 | AddUniform (IEnums::UniformItem item, IEnums::UniformType type, UInt32 &byteOffset)=0 |
Add a single predefined uniform variable. More... | |
virtual SInt32 | AddUniform (SInt32 id, IEnums::UniformType type, UInt32 &byteOffset)=0 |
Add a single custom uniform variable, by its unique integer ID in the renderer. More... | |
virtual SInt32 | AddUniform (const String &name, IEnums::UniformType type, UInt32 &byteOffset)=0 |
Add a single custom uniform variable, by its actual name. More... | |
virtual Bool | RemoveAllUniforms ()=0 |
Remove all present uniform variables from the buffer. More... | |
virtual SInt32 | GetUniformIndex (IEnums::UniformItem item) const =0 |
Get the index of a predefined uniform variable in the buffer. More... | |
virtual SInt32 | GetUniformIndex (SInt32 id) const =0 |
Get the index of a custom uniform variable in the buffer, by its unique integer ID. More... | |
virtual SInt32 | GetUniformIndex (const String &name) const =0 |
Get the index of a custom uniform variable in the buffer, by its actual name. More... | |
virtual UInt32 | GetNumberOfUniforms () const =0 |
Get the total number of individual uniform variables present in the buffer. More... | |
virtual IEnums::UniformType | GetUniformType (UInt32 index) const =0 |
Get the data type of a uniform variable at a given index. More... | |
virtual IEnums::UniformItem | GetUniformItem (UInt32 index) const =0 |
Get the predefined uniform variable item at a given index. More... | |
virtual SInt32 | GetUniformId (UInt32 index) const =0 |
Get the unique integer ID of a uniform variable at a given index. More... | |
virtual UInt32 | GetUniformByteOffset (UInt32 index) const =0 |
Get the byte offset of a uniform variable relative to the buffer start. More... | |
virtual IUniform * | GetUniform (UInt32 index) const =0 |
Get the generic uniform variable at a given index. More... | |
virtual IFloatUniform * | GetFloatUniform (UInt32 index) const =0 |
Get the uniform variable at a given index as an IFloatUniform. More... | |
virtual IFloatVector2Uniform * | GetFloatVector2Uniform (UInt32 index) const =0 |
Get the uniform variable at a given index as an IFloatVector2Uniform. More... | |
virtual IFloatVector3Uniform * | GetFloatVector3Uniform (UInt32 index) const =0 |
Get the uniform variable at a given index as an IFloatVector3Uniform. More... | |
virtual IFloatVector4Uniform * | GetFloatVector4Uniform (UInt32 index) const =0 |
Get the uniform variable at a given index as an IFloatVector4Uniform. More... | |
virtual IFloatMatrix2Uniform * | GetFloatMatrix2Uniform (UInt32 index) const =0 |
Get the uniform variable at a given index as an IFloatMatrix2Uniform. More... | |
virtual IFloatMatrix3Uniform * | GetFloatMatrix3Uniform (UInt32 index) const =0 |
Get the uniform variable at a given index as an IFloatMatrix3Uniform. More... | |
virtual IFloatMatrix4Uniform * | GetFloatMatrix4Uniform (UInt32 index) const =0 |
Get the uniform variable at a given index as an IFloatMatrix4Uniform. More... | |
virtual ISInt32Uniform * | GetSInt32Uniform (UInt32 index) const =0 |
Get the uniform variable at a given index as an ISInt32Uniform. More... | |
virtual ISInt32Vector2Uniform * | GetSInt32Vector2Uniform (UInt32 index) const =0 |
Get the uniform variable at a given index as an ISInt32Vector2Uniform. More... | |
virtual ISInt32Vector3Uniform * | GetSInt32Vector3Uniform (UInt32 index) const =0 |
Get the uniform variable at a given index as an ISInt32Vector3Uniform. More... | |
virtual ISInt32Vector4Uniform * | GetSInt32Vector4Uniform (UInt32 index) const =0 |
Get the uniform variable at a given index as an ISInt32Vector4Uniform. More... | |
virtual Bool | IsEqual (const IConstantBuffer *other) const =0 |
Check if the constant buffer is equal to another one. More... | |
virtual UInt32 | GetSignature () const =0 |
Get the signature, obtained via IRenderer::AcquireConstantBufferSignature(). More... | |
|
pure virtual |
Get the mutable Video::IObject interface.
|
pure virtual |
Get the constant Video::IObject interface.
|
pure virtual |
Attach the constant buffer to the current GPU program.
currentProgram | The current GPU program. |
id | The unique integer ID of the constant buffer in the renderer. |
|
pure virtual |
Set the access mode hint (read only or read/write).
mode | The access mode. |
|
pure virtual |
Get the access mode hint.
|
pure virtual |
Assign a mutable source data storage.
constants | A pointer to the mutable buffer holding individual uniform values. |
maxByteSize | The size of the buffer in bytes. |
|
pure virtual |
Assign a constant source data storage.
constants | A pointer to the constant buffer holding individual uniform values. |
maxByteSize | The size of the buffer in bytes. |
Set the actual size of the buffer used.
byteSize | The actual buffer size in bytes. Must be less or equal than the maximum byte size defined via SetConstantData(). |
|
pure virtual |
Mark the whole buffer as modified.
|
pure virtual |
Mark a sub-region of the buffer as modified.
firstConstant | The first modified constant in the buffer. |
numberOfConstants | The number of modified constants. |
|
pure virtual |
Get a pointer to the mutable source data, if available.
If the source data storage was defined using a constant pointer, this method returns null.
|
pure virtual |
Get a constant pointer to the source data.
|
pure virtual |
Get a pointer to the actual mutable buffer data.
|
pure virtual |
Get a pointer to the actual constant buffer data.
|
pure virtual |
Get the maximum number of bytes the buffer can hold.
|
pure virtual |
Get the actual number of buffer bytes used.
|
pure virtual |
Check if the buffer contents are modified.
|
pure virtual |
Add a single predefined uniform variable.
item | The predefined item. |
type | The uniform data type. |
byteOffset | The offset in bytes of the uniform's location within the actual buffer data. |
|
pure virtual |
Add a single custom uniform variable, by its unique integer ID in the renderer.
id | The uniform's unique integer ID. |
type | The uniform data type. |
byteOffset | The offset in bytes of the uniform's location within the actual buffer data. |
|
pure virtual |
Add a single custom uniform variable, by its actual name.
name | The uniform variable name. |
type | The uniform data type. |
byteOffset | The offset in bytes of the uniform's location within the actual buffer data. |
|
pure virtual |
Remove all present uniform variables from the buffer.
|
pure virtual |
Get the index of a predefined uniform variable in the buffer.
item | The uniform item to query. |
Get the index of a custom uniform variable in the buffer, by its unique integer ID.
id | The unique integer ID of the variable to query. |
|
pure virtual |
Get the index of a custom uniform variable in the buffer, by its actual name.
name | The uniform variable name to query. |
|
pure virtual |
Get the total number of individual uniform variables present in the buffer.
|
pure virtual |
Get the data type of a uniform variable at a given index.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the predefined uniform variable item at a given index.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
Get the unique integer ID of a uniform variable at a given index.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the byte offset of a uniform variable relative to the buffer start.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
Get the generic uniform variable at a given index.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the uniform variable at a given index as an IFloatUniform.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the uniform variable at a given index as an IFloatVector2Uniform.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the uniform variable at a given index as an IFloatVector3Uniform.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the uniform variable at a given index as an IFloatVector4Uniform.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the uniform variable at a given index as an IFloatMatrix2Uniform.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the uniform variable at a given index as an IFloatMatrix3Uniform.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the uniform variable at a given index as an IFloatMatrix4Uniform.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the uniform variable at a given index as an ISInt32Uniform.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the uniform variable at a given index as an ISInt32Vector2Uniform.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the uniform variable at a given index as an ISInt32Vector3Uniform.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Get the uniform variable at a given index as an ISInt32Vector4Uniform.
index | The index of the variable to query, from 0 to GetNumberOfUniforms()-1. |
|
pure virtual |
Check if the constant buffer is equal to another one.
other | The buffer to compare with. |
|
pure virtual |
Get the signature, obtained via IRenderer::AcquireConstantBufferSignature().