Describes a constant buffer. More...
Public Member Functions | |
ConstantBuffer () | |
virtual | ~ConstantBuffer () |
ShaderPassMemorySlot * | getPassMemorySlot (unsigned int index) |
ShaderPassMemorySlot * | getPassMemorySlotReadOnly (unsigned int index) const |
ShaderPassMemorySlot * | addPassMemorySlot () |
void | changePassMemorySlotOrder (unsigned int fromIndex, unsigned int toIndex) |
void | deletePassMemorySlot (unsigned int index) |
virtual void | checkBuffer ()=0 |
virtual void | fillBuffer ()=0 |
virtual void | exportClassToTree (nkExport::Node *rootNode) override |
virtual void | importClassFromTree (nkExport::Node *rootNode) override |
Public Member Functions inherited from nkExport::Exportable | |
Exportable () noexcept | |
virtual | ~Exportable () |
Describes a constant buffer.
nkGraphics::ConstantBuffer::ConstantBuffer | ( | ) |
Constructor. See Shader::addConstantBuffer().
|
virtual |
Destructor.
ShaderPassMemorySlot* nkGraphics::ConstantBuffer::getPassMemorySlot | ( | unsigned int | index | ) |
index | The index of the slot to retrieve. |
ShaderPassMemorySlot* nkGraphics::ConstantBuffer::getPassMemorySlotReadOnly | ( | unsigned int | index | ) | const |
The read only version of the getter. Use this version when possible, as this avoid a dirtification of the tracking data.
index | The index of the slot to retrieve. |
ShaderPassMemorySlot* nkGraphics::ConstantBuffer::addPassMemorySlot | ( | ) |
Adds a pass memory slot. Memory slots are fed sequentially, in the order they are declared. Be sure to align all structures within shaders to be coherent with the way the data is fed.
void nkGraphics::ConstantBuffer::changePassMemorySlotOrder | ( | unsigned int | fromIndex, |
unsigned int | toIndex | ||
) |
Changes the ordering in the slots, impacting the way they are fed to the buffer.
fromIndex | The index of the slot to change. |
toIndex | The index to which the slot should be moved. |
void nkGraphics::ConstantBuffer::deletePassMemorySlot | ( | unsigned int | index | ) |
Erases and frees a slot.
index | The index of the slot to erase. |
|
pure virtual |
Used internally for update purpose.
|
pure virtual |
Used internally for update purpose.
|
overridevirtual |
Basic exporting capabilities.
rootNode | The tree to export to. |
Implements nkExport::Exportable.
|
overridevirtual |
Basic importing capabilities.
rootNode | The tree to import from. |
Implements nkExport::Exportable.