NAP
Public Member Functions | Public Attributes | List of all members
ShaderVariableStructBufferDeclaration Class Reference

#include <shadervariabledeclarations.h>

Public Member Functions

 ShaderVariableStructBufferDeclaration (const std::string &name, int offset, int size, int stride, int numElements)
 
- Public Member Functions inherited from ShaderVariableDeclaration
 ShaderVariableDeclaration (const std::string &name, int offset, int size)
 
virtual ~ShaderVariableDeclaration ()
 
 ShaderVariableDeclaration (ShaderVariableDeclaration &&inRHS)=default
 
ShaderVariableDeclarationoperator= (ShaderVariableDeclaration &&inRHS)=default
 
 ShaderVariableDeclaration (const ShaderVariableDeclaration &)=delete
 
ShaderVariableDeclarationoperator= (const ShaderVariableDeclaration &)=delete
 

Public Attributes

std::unique_ptr< ShaderVariableStructDeclarationmElement
 Struct declaration. More...
 
int mNumElements
 Total number of struct elements in list. More...
 
int mStride
 Stride of struct element in array. More...
 
- Public Attributes inherited from ShaderVariableDeclaration
std::string mName
 Name of the declaration. More...
 
int mOffset
 Memory offset. More...
 
int mSize
 Total size (in bytes) of declaration. More...
 

Description

Buffer representation of shader variable struct shader declarations. Used for storage buffers.

ShaderVariableStructBufferDeclaration is a special shader variable declaration type exclusive to storage buffer descriptor types. They are not built recursively as none of the values have to be assigned or accessed individually, but rather the buffer as a whole. Therefore, we only store the declaration of a single struct item as a ShaderVariableStructDeclaration, and set it to the element member of the ShaderVariableStructBufferDeclaration along with the element stride and count.

Inheritance diagram for ShaderVariableStructBufferDeclaration:
[legend]
Collaboration diagram for ShaderVariableStructBufferDeclaration:
[legend]

Constructor & Destructor Documentation

◆ ShaderVariableStructBufferDeclaration()

ShaderVariableStructBufferDeclaration ( const std::string &  name,
int  offset,
int  size,
int  stride,
int  numElements 
)

Member Data Documentation

◆ mElement

std::unique_ptr<ShaderVariableStructDeclaration> mElement

Struct declaration.

◆ mNumElements

int mNumElements

Total number of struct elements in list.

◆ mStride

int mStride

Stride of struct element in array.