Cogs.Core
|
Material property buffer instances are created from MaterialPropertyBuffers, and have the same set of properties and layout as the buffer. More...
#include <MaterialPropertyBuffer.h>
Additional Inherited Members | |
![]() | |
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 |
![]() | |
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. | |
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.