Skip to content

Commit

Permalink
Traktor: Cleaning up indirect draw buffers in TerrainComponent when r…
Browse files Browse the repository at this point in the history
…ecreating patches.
  • Loading branch information
apistol78 committed Jan 25, 2024
1 parent 101eae2 commit 5202452
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/Terrain/TerrainComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,11 @@ bool TerrainComponent::createPatches()
{
m_patches.clear();
m_patchCount = 0;

safeDestroy(m_indexBuffer);
safeDestroy(m_vertexBuffer);
safeDestroy(m_drawBuffer);
safeDestroy(m_dataBuffer);

const uint32_t heightfieldSize = m_heightfield->getSize();
T_ASSERT(heightfieldSize > 0);
Expand Down

0 comments on commit 5202452

Please sign in to comment.