API Documentation
ShaderInstanceMemorySlot.h
1 // ShaderInstanceMemorySlot.h
3 //
5 
6 namespace nkGraphics
7 {
14  {
15  public :
16 
20  enum class DATA_TYPE
21  {
22  UNKNOWN = 0,
23  WORLD_MATRIX,
25  CUSTOM
26  } ;
27 
28  public :
29 
35  ShaderInstanceMemorySlot (System* system) noexcept ;
40 
41  // Getters
45  DATA_TYPE getType () const ;
53  virtual unsigned int getDataSize () const ;
57  virtual nkMemory::StringView getDataTypeAsString () const override ;
58 
59  // Setters
79  void setAsWorldMatrix () ;
107 
113  virtual void exportClassToTree (nkExport::Node* rootNode) override ;
119  virtual void importClassFromTree (nkExport::Node* rootNode) override ;
120  } ;
121 }
nkGraphics::ShaderInstanceMemorySlot::setAsWorldMatrixInvTranspose
void setAsWorldMatrixInvTranspose()
nkGraphics::ShaderMemorySlot
A memory slot in a memory resource.
Definition: ShaderMemorySlot.h:15
nkGraphics::ShaderInstanceMemorySlot::ShaderInstanceMemorySlot
ShaderInstanceMemorySlot(System *system) noexcept
nkGraphics::ShaderInstanceMemorySlot::DATA_TYPE
DATA_TYPE
Definition: ShaderInstanceMemorySlot.h:21
nkGraphics::ShaderInstanceCustomSlot
A custom slot, implementable by external code.
Definition: ShaderInstanceCustomSlot.h:12
nkGraphics::ShaderInstanceMemorySlot::DATA_TYPE::CUSTOM
@ CUSTOM
Custom instance slot, coming from external code.
nkGraphics::ShaderInstanceMemorySlot::getDataTypeAsString
virtual nkMemory::StringView getDataTypeAsString() const override
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkGraphics::ShaderInstanceMemorySlot::exportClassToTree
virtual void exportClassToTree(nkExport::Node *rootNode) override
nkGraphics::ShaderInstanceMemorySlot::DATA_TYPE::WORLD_MATRIX
@ WORLD_MATRIX
Instance's world matrix.
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkGraphics::ShaderInstanceMemorySlot::setAsWorldMatrix
void setAsWorldMatrix()
nkGraphics::ShaderInstanceMemorySlot::~ShaderInstanceMemorySlot
virtual ~ShaderInstanceMemorySlot()
nkGraphics::ShaderInstanceMemorySlot::setAsCustom
void setAsCustom(ShaderInstanceCustomSlot *slot)
nkGraphics::ShaderInstanceMemorySlot::DATA_TYPE::WORLD_MATRIX_INV_TRANSPOSE
@ WORLD_MATRIX_INV_TRANSPOSE
Instance's world matrix, inversed and transposed.
nkGraphics::ShaderInstanceMemorySlot::getSemanticName
nkMemory::StringView getSemanticName() const
nkGraphics::ShaderInstanceMemorySlot::DATA_TYPE::UNKNOWN
@ UNKNOWN
Unknown place holder.
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkGraphics::ShaderInstanceMemorySlot::getType
DATA_TYPE getType() const
nkGraphics::ShaderInstanceMemorySlot::getDataSize
virtual unsigned int getDataSize() const
nkGraphics::ShaderInstanceMemorySlot::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkGraphics::ShaderInstanceMemorySlot
A memory slot for per instance data in a Shader.
Definition: ShaderInstanceMemorySlot.h:14