Cogs.Core
List of all members
Cogs::Core::MaterialPropertyBufferInstance Struct Reference

Material property buffer instances are created from MaterialPropertyBuffers, and have the same set of properties and layout as the buffer. More...

#include <MaterialPropertyBuffer.h>

Inheritance diagram for Cogs::Core::MaterialPropertyBufferInstance:
Cogs::Core::MaterialPropertyBuffer

Additional Inherited Members

- Public Member Functions inherited from Cogs::Core::MaterialPropertyBuffer
COGSCORE_DLL_API MaterialPropertyDescriptor addProperty (size_t propertyAlignment, size_t propertySize, const uint8_t *data)
 Add the value pointed to by data, with the given propertySize, to the buffer.
 
COGSCORE_DLL_API void finalize (Context *context)
 
MaterialPropertyDescriptor addProperty (const bool &data)
 
MaterialPropertyDescriptor addProperty (const float &data)
 
MaterialPropertyDescriptor addProperty (const int &data)
 
MaterialPropertyDescriptor addProperty (const glm::ivec2 &data)
 
MaterialPropertyDescriptor addProperty (const glm::ivec3 &data)
 
MaterialPropertyDescriptor addProperty (const glm::ivec4 &data)
 
MaterialPropertyDescriptor addProperty (const glm::vec2 &data)
 
MaterialPropertyDescriptor addProperty (const glm::vec3 &data)
 
MaterialPropertyDescriptor addProperty (const glm::vec4 &data)
 
MaterialPropertyDescriptor addProperty (const glm::mat4 &data)
 
MaterialPropertyDescriptor addProperty (const uint32_t &data)
 
MaterialPropertyDescriptor addProperty (const glm::uvec2 &data)
 
MaterialPropertyDescriptor addProperty (const glm::uvec3 &data)
 
MaterialPropertyDescriptor addProperty (const glm::uvec4 &data)
 
COGSCORE_DLL_API void setValue (size_t offset, size_t propertySize, const uint8_t *data)
 Set the property value for the property located at offset to that pointed to by data.
 
void setValue (const MaterialPropertyDescriptor &descriptor, const uint8_t *data)
 
template<typename T >
void setValue (size_t offset, const T &value)
 Set the property value for the property located at offset to the value given.
 
template<typename T >
const T & getValue (size_t offset) const
 Get the property value of type T located at offset.
 
template<>
void setValue (size_t offset, const bool &boolValue)
 
template<>
const bool & getValue (size_t offset) const
 
- Public Attributes inherited from Cogs::Core::MaterialPropertyBuffer
std::vector< uint8_t > content
 Default content for property buffer instances created from this buffer.
 
ConstantBufferKey index
 Index of the buffer in the set of buffers owned by the same Material.
 
PropertyName name
 Name used to refer to the buffer in shaders.
 
size_t size = 0
 Total size of the buffer in bytes.
 
bool isPerInstance = true
 If the buffer is updated per instance.
 
size_t generation = 1
 Generation counter.
 

Detailed Description

Material property buffer instances are created from MaterialPropertyBuffers, and have the same set of properties and layout as the buffer.

The instance only holds values, initially copied from MaterialPropertyBuffer::defaultContent, but may later be modified through the MaterialInstance the buffer instance belongs to.

Definition at line 220 of file MaterialPropertyBuffer.h.


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