API Documentation
Public Member Functions | List of all members
nkGraphics::ConstantBuffer Class Reference

Describes a constant buffer. More...

Inheritance diagram for nkGraphics::ConstantBuffer:
nkExport::Exportable

Public Member Functions

ShaderPassMemorySlotgetPassMemorySlot (unsigned int index)
 
ShaderPassMemorySlotgetPassMemorySlotReadOnly (unsigned int index) const
 
ShaderPassMemorySlotaddPassMemorySlot ()
 
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
 
ConstantBufferoperator= (const ConstantBuffer &)=delete
 
- Public Member Functions inherited from nkExport::Exportable
 Exportable () noexcept
 
virtual ~Exportable ()
 

Detailed Description

Describes a constant buffer.

Member Function Documentation

◆ getPassMemorySlot()

ShaderPassMemorySlot* nkGraphics::ConstantBuffer::getPassMemorySlot ( unsigned int  index)
Parameters
indexThe index of the slot to retrieve.
Returns
The slot requested if available, nullptr else.

◆ getPassMemorySlotReadOnly()

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.

Parameters
indexThe index of the slot to retrieve.
Returns
The slot requested if available, nullptr else.

◆ addPassMemorySlot()

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.

Returns
A freshly allocated memory slot. The buffer is responsible for the memory returned, external code should not delete it. See deletePassMemorySlot().

◆ changePassMemorySlotOrder()

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.

Parameters
fromIndexThe index of the slot to change.
toIndexThe index to which the slot should be moved.

◆ deletePassMemorySlot()

void nkGraphics::ConstantBuffer::deletePassMemorySlot ( unsigned int  index)

Erases and frees a slot.

Parameters
indexThe index of the slot to erase.

◆ exportClassToTree()

virtual void nkGraphics::ConstantBuffer::exportClassToTree ( nkExport::Node rootNode)
overridevirtual

Basic exporting capabilities.

Parameters
rootNodeThe tree to export to.

Implements nkExport::Exportable.

◆ importClassFromTree()

virtual void nkGraphics::ConstantBuffer::importClassFromTree ( nkExport::Node rootNode)
overridevirtual

Basic importing capabilities.

Parameters
rootNodeThe tree to import from.

Implements nkExport::Exportable.

◆ operator=()

ConstantBuffer& nkGraphics::ConstantBuffer::operator= ( const ConstantBuffer )
delete

Copy assignment.


The documentation for this class was generated from the following file: