From 2a2f3a5c4fed0d2c14ba84e7f5afbc0082045d15 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 25 Jun 2025 00:25:35 +0200 Subject: [PATCH] fixed the order of operations in resetGL --- basegraph.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/basegraph.cpp b/basegraph.cpp index 2fe84ed5..d11a4954 100644 --- a/basegraph.cpp +++ b/basegraph.cpp @@ -776,15 +776,15 @@ EX void resetGL() { airbuf = nullptr; } #endif - check_cgi(); - if(currentmap) cgi.require_shapes(); - #if MAXMDIM >= 4 - if(GDIM == 3 && !floor_textures) make_floor_textures(); - #endif - cgi.initPolyForGL(); compiled_programs.clear(); matched_programs.clear(); glhr::current_glprogram = nullptr; + check_cgi(); + if(currentmap) cgi.require_shapes(); + cgi.initPolyForGL(); + #if MAXMDIM >= 4 + if(GDIM == 3 && !floor_textures) make_floor_textures(); + #endif ray::reset_raycaster(); #if CAP_RUG if(rug::glbuf) rug::close_glbuf();