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

#include <shadervariabledeclarations.h>

Public Member Functions

 BufferObjectDeclaration (const std::string &name, int binding, VkShaderStageFlags inStages, EDescriptorType descriptorType, int size)
 
 BufferObjectDeclaration (BufferObjectDeclaration &&inRHS)
 
BufferObjectDeclarationoperator= (BufferObjectDeclaration &&inRHS)
 
const ShaderVariableDeclarationgetBufferDeclaration () const
 
- Public Member Functions inherited from ShaderVariableStructDeclaration
 ShaderVariableStructDeclaration (const std::string &name, EDescriptorType descriptorType, int offset, int size)
 
virtual ~ShaderVariableStructDeclaration () override
 
 ShaderVariableStructDeclaration (ShaderVariableStructDeclaration &&inRHS)
 
ShaderVariableStructDeclarationoperator= (ShaderVariableStructDeclaration &&inRHS)
 
const ShaderVariableDeclarationfindMember (const std::string &name) const
 
- 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

int mBinding
 Shader binding identifier. More...
 
VkShaderStageFlags mStages
 Shader stages: vertex, fragment, compute etc. More...
 
- Public Attributes inherited from ShaderVariableStructDeclaration
std::vector< std::unique_ptr< ShaderVariableDeclaration > > mMembers
 All shader declarations associated with struct. More...
 
EDescriptorType mDescriptorType
 The type of descriptor for this resource. 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 Object Declaration struct. Stores shader variable declarations and is used as a descriptor object for UBOs and SSBOs.

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

Constructor & Destructor Documentation

◆ BufferObjectDeclaration() [1/2]

BufferObjectDeclaration ( const std::string &  name,
int  binding,
VkShaderStageFlags  inStages,
EDescriptorType  descriptorType,
int  size 
)

◆ BufferObjectDeclaration() [2/2]

Member Function Documentation

◆ getBufferDeclaration()

const ShaderVariableDeclaration& getBufferDeclaration ( ) const

Returns the first buffer declaration. Asserts if not present. Handy accessor for buffer bindings.

◆ operator=()

Member Data Documentation

◆ mBinding

int mBinding

Shader binding identifier.

◆ mStages

VkShaderStageFlags mStages

Shader stages: vertex, fragment, compute etc.