#include <shadervariabledeclarations.h>
Public Member Functions | |
ShaderVariableStructBufferDeclaration (const std::string &name, int offset, int size, int stride, int numElements) | |
![]() | |
ShaderVariableDeclaration (const std::string &name, int offset, int size) | |
virtual | ~ShaderVariableDeclaration () |
ShaderVariableDeclaration (ShaderVariableDeclaration &&inRHS)=default | |
ShaderVariableDeclaration & | operator= (ShaderVariableDeclaration &&inRHS)=default |
ShaderVariableDeclaration (const ShaderVariableDeclaration &)=delete | |
ShaderVariableDeclaration & | operator= (const ShaderVariableDeclaration &)=delete |
Public Attributes | |
std::unique_ptr< ShaderVariableStructDeclaration > | mElement |
Struct declaration. More... | |
int | mNumElements |
Total number of struct elements in list. More... | |
int | mStride |
Stride of struct element in array. More... | |
![]() | |
std::string | mName |
Name of the declaration. More... | |
int | mOffset |
Memory offset. More... | |
int | mSize |
Total size (in bytes) of declaration. More... | |
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.
ShaderVariableStructBufferDeclaration | ( | const std::string & | name, |
int | offset, | ||
int | size, | ||
int | stride, | ||
int | numElements | ||
) |
std::unique_ptr<ShaderVariableStructDeclaration> mElement |
Struct declaration.
int mNumElements |
Total number of struct elements in list.
int mStride |
Stride of struct element in array.