From 608692b6dfb1724b75586a6108716d4c62011838 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 16 Mar 2019 22:49:12 +0100 Subject: [PATCH] delete textures, saner resetGL calling rule? --- basegraph.cpp | 6 +++++- graph.cpp | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/basegraph.cpp b/basegraph.cpp index ebadb1c9..3f01177d 100644 --- a/basegraph.cpp +++ b/basegraph.cpp @@ -654,8 +654,12 @@ void resetGL() { delete glfont[i]; glfont[i] = NULL; } + if(floor_textures) { + delete floor_textures; + floor_textures = NULL; + } #endif - buildpolys(); + resetGeometry(); // includes buildPoly } #endif diff --git a/graph.cpp b/graph.cpp index f42a7c3b..94d4c706 100644 --- a/graph.cpp +++ b/graph.cpp @@ -6479,9 +6479,7 @@ void resetGeometry() { #if CAP_FIELD if(hyperbolic && &currfp != &fieldpattern::fp_invalid) currfp.analyze(); #endif -#if CAP_GL - resetGL(); -#endif + buildpolys(); } //=== animation