From 17ffcd1191266c9564aa26b38e3bf3a8e880e5ba Mon Sep 17 00:00:00 2001 From: Graham Pentheny Date: Tue, 8 Apr 2025 23:55:11 -0400 Subject: [PATCH] Sample_TileMesh: Removed "keep intermediate results" option now always on --- RecastDemo/Include/Sample_TileMesh.h | 1 - RecastDemo/Source/Sample_TileMesh.cpp | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/RecastDemo/Include/Sample_TileMesh.h b/RecastDemo/Include/Sample_TileMesh.h index 1ce82a26..20deb22f 100644 --- a/RecastDemo/Include/Sample_TileMesh.h +++ b/RecastDemo/Include/Sample_TileMesh.h @@ -26,7 +26,6 @@ class Sample_TileMesh : public Sample { protected: - bool m_keepIntermediateResults = true; bool m_buildAll = true; float m_totalBuildTimeMs = 0.0f; diff --git a/RecastDemo/Source/Sample_TileMesh.cpp b/RecastDemo/Source/Sample_TileMesh.cpp index b89bad08..34ce2bdc 100644 --- a/RecastDemo/Source/Sample_TileMesh.cpp +++ b/RecastDemo/Source/Sample_TileMesh.cpp @@ -190,7 +190,6 @@ void Sample_TileMesh::handleSettings() { Sample::handleCommonSettings(); - if (imguiCheck("Keep Itermediate Results", m_keepIntermediateResults)) { m_keepIntermediateResults = !m_keepIntermediateResults; } if (imguiCheck("Build All Tiles", m_buildAll)) { m_buildAll = !m_buildAll; } imguiLabel("Tiling"); @@ -877,11 +876,6 @@ unsigned char* Sample_TileMesh::buildTileMesh(const int tileX, const int tileY, } } - if (!m_keepIntermediateResults) - { - delete [] m_triareas; m_triareas = 0; - } - // Once all geometry is rasterized, we do initial pass of filtering to // remove unwanted overhangs caused by the conservative rasterization // as well as filter spans where the character cannot possibly stand. @@ -913,12 +907,6 @@ unsigned char* Sample_TileMesh::buildTileMesh(const int tileX, const int tileY, return 0; } - if (!m_keepIntermediateResults) - { - rcFreeHeightField(m_heightfield); - m_heightfield = 0; - } - // Erode the walkable area by agent radius. if (!rcErodeWalkableArea(m_buildContext, m_config.walkableRadius, *m_compactHeightfield)) { @@ -1040,12 +1028,6 @@ unsigned char* Sample_TileMesh::buildTileMesh(const int tileX, const int tileY, return 0; } - if (!m_keepIntermediateResults) - { - rcFreeCompactHeightfield(m_compactHeightfield); m_compactHeightfield = 0; - rcFreeContourSet(m_contourSet); m_contourSet = 0; - } - unsigned char* navData = 0; int navDataSize = 0; if (m_config.maxVertsPerPoly <= DT_VERTS_PER_POLYGON)