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

Function DeleteMaterial

engine/render/src/render/material.cpp:340–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338 }
339
340 void DeleteMaterial(dmRender::HRenderContext render_context, HMaterial material)
341 {
342 dmGraphics::DeleteVertexDeclaration(material->m_VertexDeclarationShared);
343
344 dmGraphics::DeleteVertexDeclaration(material->m_VertexDeclarationPerVertex);
345
346 if (material->m_VertexDeclarationPerInstance)
347 dmGraphics::DeleteVertexDeclaration(material->m_VertexDeclarationPerInstance);
348
349 for (uint32_t i = 0; i < material->m_Constants.Size(); ++i)
350 {
351 dmRender::DeleteConstant(material->m_Constants[i].m_Constant);
352 }
353 delete material;
354 }
355
356 void ApplyMaterialConstants(dmRender::HRenderContext render_context, HMaterial material, const RenderObject* render_object)
357 {

Callers 7

TearDownMethod · 0.85
TEST_FFunction · 0.85
TearDownMethod · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
FinalizeDebugRendererFunction · 0.85

Calls 3

DeleteVertexDeclarationFunction · 0.85
DeleteConstantFunction · 0.85
SizeMethod · 0.45

Tested by 5

TearDownMethod · 0.68
TEST_FFunction · 0.68
TearDownMethod · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68