Cogs.Core
Public Member Functions | Public Attributes | List of all members
Cogs::Core::ConstantBuffers Struct Reference

Public Member Functions

COGSCORE_DLL_API ConstantBufferKey addBuffer (const PropertyName &name, bool isPerInstance=true)
 
void finalizeBuffer (Context *context, ConstantBufferKey bufferKey)
 
template<typename T >
VariableKey addVariable (ConstantBufferKey bufferKey, MaterialPropertyFlags flags, const StringView &name, T defaultValue, MaterialDataType type, bool isPerInstance=true, size_t dimension=static_cast< size_t >(-1))
 
template<typename T >
void setProperty (const VariableKey key, T value)
 
VariableKey getPropertyKey (const StringView &name) const
 

Public Attributes

std::vector< MaterialPropertyBufferbuffers
 Constant buffer instances.
 
std::vector< MaterialPropertyvariables
 Individual variables from all buffer instances.
 
uint16_t buffersGeneration = 0
 If the constant buffer bindings need updates.
 

Detailed Description

Definition at line 14 of file ConstantBuffers.h.

Member Function Documentation

◆ addBuffer()

Cogs::Core::ConstantBufferKey Cogs::Core::ConstantBuffers::addBuffer ( const PropertyName name,
bool  isPerInstance = true 
)

Definition at line 40 of file Material.cpp.

◆ addVariable()

template<typename T >
VariableKey Cogs::Core::ConstantBuffers::addVariable ( ConstantBufferKey  bufferKey,
MaterialPropertyFlags  flags,
const StringView name,
defaultValue,
MaterialDataType  type,
bool  isPerInstance = true,
size_t  dimension = static_cast<size_t>(-1) 
)
inline

Definition at line 21 of file ConstantBuffers.h.

◆ finalizeBuffer()

void Cogs::Core::ConstantBuffers::finalizeBuffer ( Context context,
ConstantBufferKey  bufferKey 
)
inline

Definition at line 18 of file ConstantBuffers.h.

◆ getPropertyKey()

VariableKey Cogs::Core::ConstantBuffers::getPropertyKey ( const StringView name) const
inline

Definition at line 79 of file ConstantBuffers.h.

◆ setProperty()

template<typename T >
void Cogs::Core::ConstantBuffers::setProperty ( const VariableKey  key,
value 
)
inline

Definition at line 68 of file ConstantBuffers.h.

Member Data Documentation

◆ buffers

std::vector<MaterialPropertyBuffer> Cogs::Core::ConstantBuffers::buffers

Constant buffer instances.

Definition at line 91 of file ConstantBuffers.h.

Referenced by Cogs::Core::MaterialInstance::setupInstance().

◆ buffersGeneration

uint16_t Cogs::Core::ConstantBuffers::buffersGeneration = 0

If the constant buffer bindings need updates.

Definition at line 97 of file ConstantBuffers.h.

Referenced by Cogs::Core::RenderMaterialInstance::checkReady().

◆ variables

std::vector<MaterialProperty> Cogs::Core::ConstantBuffers::variables

Individual variables from all buffer instances.

Definition at line 94 of file ConstantBuffers.h.

Referenced by Cogs::Core::MaterialInstance::cloneMatchingProperties().


The documentation for this struct was generated from the following files: