Cogs.Core
|
Material instances represent a specialized Material combined with state for all its buffers and properties. More...
#include <MaterialInstance.h>
Public Member Functions | |
MaterialInstance ()=default | |
MaterialInstance (MaterialInstance &&other) noexcept=default | |
Move construct MaterialInstance from other. | |
MaterialInstance & | operator= (MaterialInstance &&other) noexcept=default |
Move assign MaterialInstance from other. | |
void | setupInstance (Material *material) |
Setup the material instance from the given material. | |
void | clone (MaterialInstance *instance) |
Clone the the given material instance. | |
int | cloneMatchingProperties (MaterialInstance *instance) |
Clones matching property values from the given instance. | |
void | cloneMatchingVariants (MaterialInstance *instance) |
Clones matching varient values from the given instance. | |
void | reset () |
Reset the material instance properties. | |
void | setMaterialFlag (MaterialFlags::EMaterialFlags flag) |
Set the given material flag. | |
void | setMaterialFlag (MaterialFlags::EMaterialFlags flag, bool status) |
Set the given material flag to the given state. | |
void | unsetMaterialFlag (MaterialFlags::EMaterialFlags flag) |
Unset the given material flag. | |
uint16_t | getMaterialFlags () const |
Gets flags of the instance, combined from material flags and overrides from instance. | |
void | setBackdrop () |
Set the material instance to act as backdrop when rendering. | |
void | unsetBackdrop () |
Set the material instance to act as regular geometry, not backdrop, when rendering. | |
bool | isBackdrop () const |
Get if geometry rendered with this material instance is to be treated as backdrops. | |
void | setTransparent () |
Set the material instance to transparent, indicating to the renderer that blending should be enabled when rendering using this material. | |
void | setOpaque () |
Set the material instance to opaque, indicating to the renderer that blending should be disabled for this instance. | |
bool | hasTransparency () const |
Get if this instance has any transparency and should be rendered with blending enabled. | |
bool | isDefaultMaterial () const |
Gets if this material instance is created from the default material. | |
void | setOption (const StringView &key, const StringView &value) |
Sets the option with the given key to a value parsed from the value string. | |
void | setProperty (const StringView &key, const void *value, const size_t sizeInBytes) |
void | setProperty (VariableKey key, const void *value, const size_t sizeInBytes) |
bool | getProperty (const StringView &key, void *value, const size_t sizeInBytes) const |
bool | getProperty (VariableKey key, void *value, const size_t sizeInBytes) const |
void | setTextureAddressMode (const StringView &key, const StringView &addressMode) |
Set texture address mode with textual name. | |
void | setTextureFilterMode (const StringView &key, const StringView &filterMode) |
Set texture filter mode with textual name. | |
template<typename T > | |
void | setProperty (const VariableKey key, T value) |
Set the property value of the property with the given key. | |
template<typename T > | |
T | getProperty (const VariableKey key) const |
Get the property value of the property with the given key in the given collection. | |
void | setVec2Property (const VariableKey key, glm::vec2 value) |
Set the vec2 property with the given key to value. | |
void | setVec3Property (const VariableKey key, glm::vec3 value) |
Set the vec3 property with the given key to value. | |
void | setVec4Property (const VariableKey key, glm::vec4 value) |
Set the vec4 property with the given key to value. | |
void | setInt4Property (const VariableKey key, glm::ivec4 value) |
Set the ivec4 property with the given key to value. | |
void | setMat4Property (const VariableKey key, glm::mat4 value) |
Set the mat4 property with the given key to value. | |
void | setFloatProperty (const VariableKey key, float value) |
Set the float property with the given key to value. | |
void | setIntProperty (const VariableKey key, int value) |
void | setUIntProperty (const VariableKey key, uint32_t value) |
void | setBoolProperty (const VariableKey key, bool value) |
Set the bool property with the given key to value. | |
void | setTextureProperty (const StringView &key, TextureHandle value) |
Set the texture property with the given key to the texture resource held by value. | |
void | setTextureProperty (const VariableKey key, TextureHandle value) |
void | setTextureAddressMode (const VariableKey key, SamplerState::AddressMode mode) |
Set the address mode used for the texture property with the given key to mode. | |
void | setTextureAddressMode (const VariableKey key, SamplerState::AddressMode sMode, SamplerState::AddressMode tMode, SamplerState::AddressMode uMode) |
void | setTextureFilterMode (const VariableKey key, SamplerState::FilterMode filterMode) |
Set the filter mode used for a texture property. | |
glm::vec2 | getVec2Property (const VariableKey key) const |
Get the value of the property with the given key. | |
glm::vec3 | getVec3Property (const VariableKey key) const |
Get the value of the property with the given key. | |
glm::vec4 | getVec4Property (const VariableKey key) const |
Get the value of the property with the given key. | |
glm::mat4 | getMat4Property (const VariableKey key) const |
Get the value of the property with the given key. | |
bool | getBoolProperty (const VariableKey key) const |
Get the value of the property with the given key. | |
float | getFloatProperty (const VariableKey key) const |
Get the value of the property with the given key. | |
TextureValue | getTextureProperty (const VariableKey key) const |
Get the value of the property with the given key. | |
size_t | getPermutationIndex (const StringView &key) const |
void | setPermutation (const StringView &key) |
StringView | getPermutation () const |
void | setVariant (size_t index, int value) |
void | setVariant (size_t index, bool value) |
void | setVariant (size_t index, const StringView &value) |
void | setVariant (const StringView &key, const StringView &value) |
void | setVariant (const StringView &key, const char *value) |
void | setVariant (const StringView &key, bool value) |
void | setVariant (const StringView &key, int value) |
std::string | getVariant (const StringView &key) const |
![]() | |
ResourceBase ()=default | |
Constructs a new resource base. | |
ResourceBase (const ResourceBase &other)=delete | |
Disable trivial copies of resources. | |
ResourceBase & | operator= (const ResourceBase &other)=delete |
Disable copy-assignment of resources. | |
ResourceBase (ResourceBase &&other) | |
Move constructs a resource base from other. | |
ResourceBase & | operator= (ResourceBase &&other) |
Move assign the resource from the given ResourceBase other. | |
~ResourceBase () | |
Destructs the resource. | |
void | setInitialized () |
void | setChanged () |
bool | hasChanged () const |
void | setLoading () |
void | setLoaded () |
void | setFailedLoad () |
void | setActive () |
void | setResident () |
void | setProxy () |
void | setKeepStorage () |
bool | isInitialized () const |
bool | isLoaded () const |
bool | isActive () const |
bool | isResident () const |
bool | isDependency () const |
bool | isDeleted () const |
bool | isOrphaned () const |
bool | isProxy () const |
bool | hasFailedLoad () const |
bool | hasFailedActivation () const |
bool | keepStorage () const |
void | setType (ResourceTypes type) |
Set the type enumeration of the resource. | |
ResourceTypes | getType () const |
Gets the type enumeration of the resource. | |
void | setId (ResourceId resourceId) |
Set the resource id of the resource. | |
ResourceId | getId () const |
Get the resource id of this instance. | |
void | setFlag (ResourceFlags flags) |
Set the given resource flag. | |
void | setFlags (ResourceFlags flags) |
void | unsetFlag (ResourceFlags flag) |
Unset the given flag. | |
bool | isSet (ResourceFlags flag) const |
Check if the given flag is currently set. | |
ResourceFlags | getFlags () const |
Get the current flags of the resource. | |
void | attachResource (RenderResource *attachment) |
Attach the given GPU resource to the resource. | |
bool | hasAttachedResource () const |
Check if the resource has an attachment. | |
RenderResource * | getAttachedResource () const |
Get the attached resource. | |
void | setOwner (IResourceManager *owner) |
Sets the owner of this resource instance. | |
IResourceManager * | getOwner () const |
void | setName (const StringView &name) |
Set the user friendly name of the resource. | |
StringView | getName () const |
Get the name of the resource. | |
void | setSource (const StringView &source) |
StringView | getSource () const |
void | increment () |
Increments the reference count of the resource. | |
void | decrement () |
Decrement the reference count of the resource. | |
uint32_t | referenceCount () const |
Get the current reference count. | |
void | incrementGeneration () |
Increment the generation count. | |
uint32_t | getGeneration () const |
Get the generation count. | |
void | setSlot (uint32_t slot) |
Sets the slot at which the resource is internally tracked. | |
uint32_t | getSlot () const |
Gets the slot where the resource is tracked internally. | |
Public Attributes | |
Material * | material = nullptr |
Material resource this MaterialInstance is created from. | |
MaterialInstanceHandle | masterInstance |
Master material instance overriding properties in this instance if override is enabled. | |
std::vector< MaterialPropertyBufferInstance > | buffers |
Buffer instances matching the buffers and layout of the parent material. | |
std::vector< TextureValue > | textureVariables |
Texture property values for this instance. | |
uint16_t | instanceFlags = MaterialFlags::None |
Material instance flags. | |
MaterialOptions | options |
Material rendering options used by this instance. | |
ShaderVariantSelectors | variantSelectors |
Variant selectors. | |
std::vector< std::string > | variantStrings |
String storage for string variants. | |
size_t | permutationIndex = 0 |
Index of material permutation to use. | |
size_t | variantGeneration = 0 |
If the variant or definitions need updates. | |
uint16_t | buffersGeneration = 1 |
If the material buffer bindings need updates. | |
Additional Inherited Members | |
![]() | |
static const uint32_t | NoAttachment = 0xFFFFFFFF |
Constant used to signal no attachment. | |
Material instances represent a specialized Material combined with state for all its buffers and properties.
All material instances created from the same material share the effect resource and properties of the material. Only the values contained in the buffers and properties may differ between MaterialInstances created from the same Material.
Definition at line 16 of file MaterialInstance.h.
|
default |
Default constructs a MaterialInstance. The instance is not usable before the call to setupInstance() with a valid material.
void Cogs::Core::MaterialInstance::clone | ( | MaterialInstance * | instance | ) |
Clone the the given material instance.
Replaces the current material type with that of the source instance.
Cloned properties include:
Definition at line 156 of file MaterialInstance.cpp.
References buffers, instanceFlags, masterInstance, material, options, permutationIndex, Cogs::setChanged(), textureVariables, variantSelectors, and variantStrings.
Referenced by Cogs::Core::EchoSounder::UniformGridSystem::preUpdate().
int Cogs::Core::MaterialInstance::cloneMatchingProperties | ( | MaterialInstance * | instance | ) |
Clones matching property values from the given instance.
The material types do not have to be equal. Properties are considered matching and copied if name, type, size and flags are equal.
Definition at line 178 of file MaterialInstance.cpp.
References getBoolProperty(), getTextureProperty(), Cogs::Core::TextureWithSampler::handle, material, Cogs::Core::TextureValue::texture, and Cogs::Core::ConstantBuffers::variables.
void Cogs::Core::MaterialInstance::cloneMatchingVariants | ( | MaterialInstance * | instance | ) |
Clones matching varient values from the given instance.
Definition at line 225 of file MaterialInstance.cpp.
References material, and variantStrings.
|
inline |
Get the value of the property with the given key.
key | Key to the property. |
Definition at line 382 of file MaterialInstance.h.
Referenced by cloneMatchingProperties().
|
inline |
Get the value of the property with the given key.
key | Key to the property. |
Definition at line 394 of file MaterialInstance.h.
|
inline |
Get the value of the property with the given key.
key | Key to the property. |
Definition at line 370 of file MaterialInstance.h.
|
inline |
Gets flags of the instance, combined from material flags and overrides from instance.
Definition at line 103 of file MaterialInstance.h.
Cogs::StringView Cogs::Core::MaterialInstance::getPermutation | ( | ) | const |
Definition at line 568 of file MaterialInstance.cpp.
size_t Cogs::Core::MaterialInstance::getPermutationIndex | ( | const StringView & | key | ) | const |
Definition at line 536 of file MaterialInstance.cpp.
bool Cogs::Core::MaterialInstance::getProperty | ( | const StringView & | key, |
void * | value, | ||
const size_t | sizeInBytes | ||
) | const |
Definition at line 375 of file MaterialInstance.cpp.
|
inline |
Get the property value of the property with the given key in the given collection.
collection | Collection of properties the property is located in. |
key | Property key used to look up the material property in the collection. |
T | Type of the property value to get. Must be the same as the value type of the properties contained in collection. |
Collection | Type of the property collection. Inferred from collection. |
Definition at line 212 of file MaterialInstance.h.
bool Cogs::Core::MaterialInstance::getProperty | ( | VariableKey | key, |
void * | value, | ||
const size_t | sizeInBytes | ||
) | const |
Definition at line 387 of file MaterialInstance.cpp.
|
inline |
Get the value of the property with the given key.
key | Key to the property. |
Definition at line 406 of file MaterialInstance.h.
Referenced by Cogs::Core::SetTexturePropertyCommand::apply(), and cloneMatchingProperties().
std::string Cogs::Core::MaterialInstance::getVariant | ( | const StringView & | key | ) | const |
Definition at line 663 of file MaterialInstance.cpp.
|
inline |
Get the value of the property with the given key.
key | Key to the property. |
Definition at line 334 of file MaterialInstance.h.
|
inline |
Get the value of the property with the given key.
key | Key to the property. |
Definition at line 346 of file MaterialInstance.h.
|
inline |
Get the value of the property with the given key.
key | Key to the property. |
Definition at line 358 of file MaterialInstance.h.
bool Cogs::Core::MaterialInstance::hasTransparency | ( | ) | const |
Get if this instance has any transparency and should be rendered with blending enabled.
Definition at line 278 of file MaterialInstance.cpp.
References Cogs::Core::HandleIsValid(), and Cogs::Core::MaterialFlags::MasterTransparency.
|
inline |
Get if geometry rendered with this material instance is to be treated as backdrops.
Definition at line 116 of file MaterialInstance.h.
|
inline |
Gets if this material instance is created from the default material.
Definition at line 142 of file MaterialInstance.h.
void Cogs::Core::MaterialInstance::reset | ( | ) |
Reset the material instance properties.
Definition at line 259 of file MaterialInstance.cpp.
|
inline |
Set the material instance to act as backdrop when rendering.
Definition at line 106 of file MaterialInstance.h.
|
inline |
Set the bool property with the given key to value.
key | Key of the bool property to set. |
value | Value to set the property to. |
Definition at line 301 of file MaterialInstance.h.
Referenced by Cogs::Core::updateMaterialInstance().
|
inline |
Set the float property with the given key to value.
key | Key of the float property to set. |
value | Value to set the property to. |
Definition at line 280 of file MaterialInstance.h.
Referenced by Cogs::Core::EchoSounder::UniformGridSystem::preUpdate(), and Cogs::Core::updateMaterialInstance().
|
inline |
Set the ivec4 property with the given key to value.
key | Key of the vec4 property to set. |
value | Value to set the property to. |
Definition at line 258 of file MaterialInstance.h.
|
inline |
Definition at line 285 of file MaterialInstance.h.
|
inline |
Set the mat4 property with the given key to value.
key | Key of the mat4 property to set. |
value | Value to set the property to. |
Definition at line 269 of file MaterialInstance.h.
|
inline |
Set the given material flag.
The material flags of the MaterialInstance are combined with those from the parent material to form the final flag status.
flag | Material flag to set. |
Definition at line 82 of file MaterialInstance.h.
|
inline |
Set the given material flag to the given state.
The material flags of the MaterialInstance are combined with those from the parent material to form the final flag status.
flag | Material flag. |
status | State to set the flag to. |
Definition at line 93 of file MaterialInstance.h.
void Cogs::Core::MaterialInstance::setOpaque | ( | ) |
Set the material instance to opaque, indicating to the renderer that blending should be disabled for this instance.
Definition at line 314 of file MaterialInstance.cpp.
Referenced by Cogs::Core::EchoSounder::UniformGridSystem::preUpdate().
void Cogs::Core::MaterialInstance::setOption | ( | const StringView & | key, |
const StringView & | value | ||
) |
Sets the option with the given key to a value parsed from the value string.
Definition at line 320 of file MaterialInstance.cpp.
Referenced by Cogs::Core::updateMaterialInstance().
void Cogs::Core::MaterialInstance::setPermutation | ( | const StringView & | key | ) |
Definition at line 547 of file MaterialInstance.cpp.
void Cogs::Core::MaterialInstance::setProperty | ( | const StringView & | key, |
const void * | value, | ||
const size_t | sizeInBytes | ||
) |
Definition at line 325 of file MaterialInstance.cpp.
|
inline |
Set the property value of the property with the given key.
Setting a property triggers resending the properties to the renderer before using this instance for rendering.
key | Property key used to look up the material property. |
value | Value to set the property to. |
T | Type of the value to set the property to. Inferred from value. Must be the same as the value type of the properties contained in collection. |
Definition at line 182 of file MaterialInstance.h.
References Cogs::setChanged().
void Cogs::Core::MaterialInstance::setProperty | ( | VariableKey | key, |
const void * | value, | ||
const size_t | sizeInBytes | ||
) |
Definition at line 337 of file MaterialInstance.cpp.
void Cogs::Core::MaterialInstance::setTextureAddressMode | ( | const StringView & | key, |
const StringView & | addressMode | ||
) |
Set texture address mode with textual name.
addressMode | String with address mode, accepted values are "Clamp", "Wrap", "Mirror", and "Border". |
Definition at line 411 of file MaterialInstance.cpp.
References Cogs::SamplerState::Border, Cogs::SamplerState::Clamp, Cogs::hash(), Cogs::StringView::hashLowercase(), Cogs::SamplerState::Mirror, and Cogs::SamplerState::Wrap.
Referenced by Cogs::Core::EchoSounder::UniformGridSystem::preUpdate().
void Cogs::Core::MaterialInstance::setTextureAddressMode | ( | const VariableKey | key, |
SamplerState::AddressMode | mode | ||
) |
Set the address mode used for the texture property with the given key to mode.
key | Key to a texture property. |
mode | Address mode to use when rendering geometry with this texture and material instance. |
Definition at line 497 of file MaterialInstance.cpp.
void Cogs::Core::MaterialInstance::setTextureAddressMode | ( | const VariableKey | key, |
SamplerState::AddressMode | sMode, | ||
SamplerState::AddressMode | tMode, | ||
SamplerState::AddressMode | uMode | ||
) |
Definition at line 502 of file MaterialInstance.cpp.
void Cogs::Core::MaterialInstance::setTextureFilterMode | ( | const StringView & | key, |
const StringView & | filterMode | ||
) |
Set texture filter mode with textual name.
filterMode | String with textdure mode, accepted values are "Point", "MinMagMipPoint", "Linear", "MinMagMipLinear", "ComparisonPoint", "ComparisonMinMagMipPoint", "ComparisonLinear", "ComparisonMinMagMipLinear". |
Definition at line 443 of file MaterialInstance.cpp.
References Cogs::SamplerState::ComparisonMinMagMipLinear, Cogs::SamplerState::ComparisonMinMagMipPoint, Cogs::hash(), Cogs::StringView::hashLowercase(), Cogs::SamplerState::MinMagMipLinear, and Cogs::SamplerState::MinMagMipPoint.
void Cogs::Core::MaterialInstance::setTextureFilterMode | ( | const VariableKey | key, |
SamplerState::FilterMode | filterMode | ||
) |
Set the filter mode used for a texture property.
Definition at line 521 of file MaterialInstance.cpp.
References Cogs::Core::TextureWithSampler::filterMode, Cogs::setChanged(), and Cogs::Core::TextureValue::texture.
void Cogs::Core::MaterialInstance::setTextureProperty | ( | const StringView & | key, |
TextureHandle | value | ||
) |
Set the texture property with the given key to the texture resource held by value.
key | Key of the texture property to set. |
value | Handle to a Texture resource to use. If NoHandle, no texture is passed to the effect. |
Definition at line 475 of file MaterialInstance.cpp.
Referenced by Cogs::Core::SetTexturePropertyCommand::apply(), Cogs::Core::Image360System::update(), and Cogs::Core::updateMaterialInstance().
void Cogs::Core::MaterialInstance::setTextureProperty | ( | const VariableKey | key, |
TextureHandle | value | ||
) |
Definition at line 480 of file MaterialInstance.cpp.
void Cogs::Core::MaterialInstance::setTransparent | ( | ) |
Set the material instance to transparent, indicating to the renderer that blending should be enabled when rendering using this material.
Definition at line 308 of file MaterialInstance.cpp.
Referenced by Cogs::Core::EchoSounder::UniformGridSystem::preUpdate().
|
inline |
Definition at line 290 of file MaterialInstance.h.
void Cogs::Core::MaterialInstance::setupInstance | ( | Material * | material | ) |
Setup the material instance from the given material.
All values and fields of the material instance will be initialized to the values of the material given, and the instance will automatically have the same buffers and properties as those of the material.
material | Pointer to an existing material to base the material instance on. |
Definition at line 126 of file MaterialInstance.cpp.
References Cogs::Core::ConstantBuffers::buffers, buffers, material, Cogs::Core::Material::options, options, textureVariables, and variantSelectors.
void Cogs::Core::MaterialInstance::setVariant | ( | const StringView & | key, |
bool | value | ||
) |
Definition at line 642 of file MaterialInstance.cpp.
|
inline |
Definition at line 425 of file MaterialInstance.h.
void Cogs::Core::MaterialInstance::setVariant | ( | const StringView & | key, |
const StringView & | value | ||
) |
Definition at line 656 of file MaterialInstance.cpp.
void Cogs::Core::MaterialInstance::setVariant | ( | const StringView & | key, |
int | value | ||
) |
Definition at line 649 of file MaterialInstance.cpp.
void Cogs::Core::MaterialInstance::setVariant | ( | size_t | index, |
bool | value | ||
) |
Definition at line 573 of file MaterialInstance.cpp.
void Cogs::Core::MaterialInstance::setVariant | ( | size_t | index, |
const StringView & | value | ||
) |
Definition at line 583 of file MaterialInstance.cpp.
void Cogs::Core::MaterialInstance::setVariant | ( | size_t | index, |
int | value | ||
) |
Definition at line 578 of file MaterialInstance.cpp.
|
inline |
Set the vec2 property with the given key to value.
key | Key of the vec2 property to set. |
value | Value to set the property to. |
Definition at line 225 of file MaterialInstance.h.
Referenced by Cogs::Core::updateMaterialInstance().
|
inline |
Set the vec3 property with the given key to value.
key | Key of the vec3 property to set. |
value | Value to set the property to. |
Definition at line 236 of file MaterialInstance.h.
Referenced by Cogs::Core::updateMaterialInstance().
|
inline |
Set the vec4 property with the given key to value.
key | Key of the vec4 property to set. |
value | Value to set the property to. |
Definition at line 247 of file MaterialInstance.h.
Referenced by Cogs::Core::OGC3DTilesSystem::initialize(), Cogs::Core::EchoSounder::UniformGridSystem::preUpdate(), and Cogs::Core::updateMaterialInstance().
|
inline |
Set the material instance to act as regular geometry, not backdrop, when rendering.
Definition at line 109 of file MaterialInstance.h.
|
inline |
Unset the given material flag.
flag | Material flag to unset. |
Definition at line 100 of file MaterialInstance.h.
std::vector<MaterialPropertyBufferInstance> Cogs::Core::MaterialInstance::buffers |
Buffer instances matching the buffers and layout of the parent material.
Definition at line 438 of file MaterialInstance.h.
Referenced by clone(), and setupInstance().
uint16_t Cogs::Core::MaterialInstance::buffersGeneration = 1 |
If the material buffer bindings need updates.
Definition at line 462 of file MaterialInstance.h.
Referenced by Cogs::Core::RenderMaterialInstance::checkReady().
uint16_t Cogs::Core::MaterialInstance::instanceFlags = MaterialFlags::None |
MaterialInstanceHandle Cogs::Core::MaterialInstance::masterInstance |
Master material instance overriding properties in this instance if override is enabled.
Definition at line 435 of file MaterialInstance.h.
Referenced by clone().
Material* Cogs::Core::MaterialInstance::material = nullptr |
Material resource this MaterialInstance is created from.
Definition at line 432 of file MaterialInstance.h.
Referenced by Cogs::Core::SetTexturePropertyCommand::apply(), Cogs::Core::RenderMaterialInstance::checkReady(), clone(), cloneMatchingProperties(), cloneMatchingVariants(), Cogs::Core::OGC3DTilesSystem::initialize(), Cogs::Core::SetMaterialPropertyCommand< T >::mergeWith(), Cogs::Core::EchoSounder::UniformGridSystem::preUpdate(), setupInstance(), Cogs::Core::PotreeSystem::update(), and Cogs::Core::updateMaterialInstance().
MaterialOptions Cogs::Core::MaterialInstance::options |
Material rendering options used by this instance.
Definition at line 447 of file MaterialInstance.h.
Referenced by clone(), Cogs::Core::EchoSounder::UniformGridSystem::preUpdate(), setupInstance(), and Cogs::Core::Image360System::update().
size_t Cogs::Core::MaterialInstance::permutationIndex = 0 |
Index of material permutation to use.
Definition at line 456 of file MaterialInstance.h.
Referenced by clone(), and Cogs::Core::MaterialManager::loadMaterialVariant().
std::vector<TextureValue> Cogs::Core::MaterialInstance::textureVariables |
Texture property values for this instance.
Definition at line 441 of file MaterialInstance.h.
Referenced by clone(), Cogs::Core::ModelSystem::getLoadProgress(), setupInstance(), and Cogs::Core::ModelSystem::update().
size_t Cogs::Core::MaterialInstance::variantGeneration = 0 |
If the variant or definitions need updates.
Definition at line 459 of file MaterialInstance.h.
ShaderVariantSelectors Cogs::Core::MaterialInstance::variantSelectors |
Variant selectors.
Definition at line 450 of file MaterialInstance.h.
Referenced by clone(), Cogs::Core::MaterialManager::loadMaterialVariant(), and setupInstance().
std::vector<std::string> Cogs::Core::MaterialInstance::variantStrings |
String storage for string variants.
Definition at line 453 of file MaterialInstance.h.
Referenced by clone(), and cloneMatchingVariants().