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

Defines a single material property. More...

#include <MaterialProperty.h>

Inheritance diagram for Cogs::Core::MaterialProperty:
Cogs::Core::TextureProperty

Public Member Functions

template<typename T >
void setDefault (T &t)
 
float defaultFloat () const
 
int defaultInt () const
 
uint32_t defaultUInt () const
 
bool defaultBool () const
 
glm::vec2 defaultVec2 () const
 
glm::vec3 defaultVec3 () const
 
glm::vec4 defaultVec4 () const
 

Public Attributes

PropertyName name
 Name of the property, used to reference named uniforms of constant buffer members in shaders.
 
VariableKey key = NoProperty
 Key of the property, used to index into the property collection the property will be placed into.
 
ConstantBufferKey buffer = NoProperty
 Key to the buffer the property value is stored in.
 
MaterialPropertyDescriptor descriptor
 Property descriptor.
 
MaterialDataType type = MaterialDataType::Unknown
 Type of data held by property.
 
glm::mat4 storage
 Storage for property data. Really a union.
 
bool dirty = false
 If the property is dirty.
 
bool isPerInstance = true
 If the property is defined per instance or per material.
 
bool isArray = false
 
uint32_t arraySize = 0
 
MaterialPropertyFlags flags = MaterialPropertyFlags::None
 

Detailed Description

Defines a single material property.

Material properties are used to control input parameters to effects, such as diffuseColor, transparency etc.

Definition at line 32 of file MaterialProperty.h.

Member Function Documentation

◆ defaultBool()

bool Cogs::Core::MaterialProperty::defaultBool ( ) const
inline

Definition at line 61 of file MaterialProperty.h.

◆ defaultFloat()

float Cogs::Core::MaterialProperty::defaultFloat ( ) const
inline

Definition at line 58 of file MaterialProperty.h.

◆ defaultInt()

int Cogs::Core::MaterialProperty::defaultInt ( ) const
inline

Definition at line 59 of file MaterialProperty.h.

◆ defaultUInt()

uint32_t Cogs::Core::MaterialProperty::defaultUInt ( ) const
inline

Definition at line 60 of file MaterialProperty.h.

◆ defaultVec2()

glm::vec2 Cogs::Core::MaterialProperty::defaultVec2 ( ) const
inline

Definition at line 63 of file MaterialProperty.h.

◆ defaultVec3()

glm::vec3 Cogs::Core::MaterialProperty::defaultVec3 ( ) const
inline

Definition at line 64 of file MaterialProperty.h.

◆ defaultVec4()

glm::vec4 Cogs::Core::MaterialProperty::defaultVec4 ( ) const
inline

Definition at line 65 of file MaterialProperty.h.

◆ setDefault()

template<typename T >
void Cogs::Core::MaterialProperty::setDefault ( T &  t)
inline

Definition at line 53 of file MaterialProperty.h.

Member Data Documentation

◆ arraySize

uint32_t Cogs::Core::MaterialProperty::arraySize = 0

Definition at line 75 of file MaterialProperty.h.

◆ buffer

ConstantBufferKey Cogs::Core::MaterialProperty::buffer = NoProperty

Key to the buffer the property value is stored in.

Definition at line 41 of file MaterialProperty.h.

◆ descriptor

MaterialPropertyDescriptor Cogs::Core::MaterialProperty::descriptor

Property descriptor.

Definition at line 44 of file MaterialProperty.h.

◆ dirty

bool Cogs::Core::MaterialProperty::dirty = false

◆ flags

MaterialPropertyFlags Cogs::Core::MaterialProperty::flags = MaterialPropertyFlags::None

Definition at line 77 of file MaterialProperty.h.

◆ isArray

bool Cogs::Core::MaterialProperty::isArray = false

Definition at line 73 of file MaterialProperty.h.

◆ isPerInstance

bool Cogs::Core::MaterialProperty::isPerInstance = true

If the property is defined per instance or per material.

Definition at line 71 of file MaterialProperty.h.

◆ key

VariableKey Cogs::Core::MaterialProperty::key = NoProperty

Key of the property, used to index into the property collection the property will be placed into.

Definition at line 38 of file MaterialProperty.h.

◆ name

PropertyName Cogs::Core::MaterialProperty::name

Name of the property, used to reference named uniforms of constant buffer members in shaders.

Definition at line 35 of file MaterialProperty.h.

◆ storage

glm::mat4 Cogs::Core::MaterialProperty::storage

Storage for property data. Really a union.

Definition at line 50 of file MaterialProperty.h.

◆ type

MaterialDataType Cogs::Core::MaterialProperty::type = MaterialDataType::Unknown

Type of data held by property.

Definition at line 47 of file MaterialProperty.h.


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