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

Function GetComponentMaterial

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

Source from the content-addressed store, hash-verified

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;
478 }
479
480 static inline dmRender::HMaterial GetRenderMaterial(dmRender::HMaterial context_material, const ModelComponent* component, const ModelResource* resource, uint32_t index) {
481 return context_material ? context_material : GetComponentMaterial(component, resource, index);

Callers 9

GetRenderMaterialFunction · 0.70
SetupRenderItemsFunction · 0.70
RenderBatchWorldVSFunction · 0.70
CompModelRenderFunction · 0.70
CompModelGetPropertyFunction · 0.70
CompModelSetPropertyFunction · 0.70

Calls 1

GetMaterialResourceFunction · 0.70

Tested by

no test coverage detected