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

Function DestroyMesh

engine/modelc/src/modelimporter.cpp:88–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static void DestroyMesh(Mesh* mesh)
89{
90 mesh->m_Positions.SetCapacity(0);
91 mesh->m_Normals.SetCapacity(0);
92 mesh->m_Tangents.SetCapacity(0);
93 mesh->m_Colors.SetCapacity(0);
94 mesh->m_Weights.SetCapacity(0);
95 mesh->m_Bones.SetCapacity(0);
96 mesh->m_TexCoords0.SetCapacity(0);
97 mesh->m_TexCoords1.SetCapacity(0);
98 mesh->m_Indices.SetCapacity(0);
99 for (uint32_t i = 0; i < mesh->m_MorphTargets.Size(); ++i)
100 {
101 mesh->m_MorphTargets[i].m_Positions.SetCapacity(0);
102 mesh->m_MorphTargets[i].m_Normals.SetCapacity(0);
103 mesh->m_MorphTargets[i].m_Tangents.SetCapacity(0);
104 }
105 mesh->m_MorphTargets.SetCapacity(0);
106 mesh->m_MorphBaseWeights.SetCapacity(0);
107 free((void*)mesh->m_Name);
108}
109
110static void DestroyModel(Model* model)
111{

Callers 1

DestroyModelFunction · 0.85

Calls 3

freeFunction · 0.85
SetCapacityMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected