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

Function DestroyTextureSet

engine/gamesys/src/gamesys/scripts/script_resource.cpp:1859–1874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1857}
1858
1859static void DestroyTextureSet(dmGameSystemDDF::TextureSet& texture_set)
1860{
1861 for (uint32_t i = 0; i < texture_set.m_Geometries.m_Count; ++i)
1862 {
1863 dmGameSystemDDF::SpriteGeometry& geometry = texture_set.m_Geometries[i];
1864 delete[] geometry.m_Vertices.m_Data;
1865 delete[] geometry.m_Uvs.m_Data;
1866 delete[] geometry.m_Indices.m_Data;
1867 }
1868
1869 delete[] texture_set.m_Animations.m_Data;
1870 delete[] texture_set.m_Geometries.m_Data;
1871 delete[] texture_set.m_FrameIndices.m_Data;
1872 delete[] texture_set.m_TexCoords.m_Data;
1873 delete[] texture_set.m_ImageNameHashes.m_Data;
1874}
1875
1876// These lookup functions are needed because the values for the two enums are different,
1877// so we can't rely on the raw value to convert between them

Callers 2

CreateAtlasFunction · 0.85
SetAtlasFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected