Describes a constant buffer. More...
Public Member Functions | |
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 | exportClassToTree (nkExport::Node *rootNode) override |
virtual void | importClassFromTree (nkExport::Node *rootNode) override |
ConstantBuffer & | operator= (const ConstantBuffer &)=delete |
Public Member Functions inherited from nkExport::Exportable | |
Exportable () noexcept | |
virtual | ~Exportable () |
Describes a constant buffer.
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. |
|
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.
|
delete |
Copy assignment.