MCPcopy Create free account
hub / github.com/defold/defold / GetMaterialResource

Function GetMaterialResource

engine/gamesys/src/gamesys/components/comp_model.cpp:471–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469 }
470
471 static inline MaterialResource* GetMaterialResource(const ModelComponent* component, const ModelResource* resource, uint32_t index) {
472 // TODO: Add support for setting material on different indices
473 return component->m_Material ? component->m_Material : resource->m_Materials[index].m_Material;
474 }
475
476 static inline dmRender::HMaterial GetComponentMaterial(const ModelComponent* component, const ModelResource* resource, uint32_t index) {
477 return GetMaterialResource(component, resource, index)->m_Material;

Callers 5

GetComponentMaterialFunction · 0.70
GetTextureResourceFunction · 0.70
FillTexturesFunction · 0.70
HashRenderItemFunction · 0.70
CompModelGetPropertyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected