From 9cbc255448fef8a00d50200fdc0d20f38e0269ec Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 2 Jul 2021 19:50:31 +1000 Subject: [PATCH] [client] opengl: do not prematurely delete overlay textures Overlay textures exist for the lifetime of the renderer and as such should not be deleted when the resolution changes. --- client/renderers/OpenGL/opengl.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/client/renderers/OpenGL/opengl.c b/client/renderers/OpenGL/opengl.c index f2941b3b..d4afca76 100644 --- a/client/renderers/OpenGL/opengl.c +++ b/client/renderers/OpenGL/opengl.c @@ -279,6 +279,13 @@ void opengl_deinitialize(void * opaque) } deconfigure(this); + + if (this->hasTextures) + { + glDeleteTextures(TEXTURE_COUNT, this->textures); + this->hasTextures = false; + } + if (this->mouseData) free(this->mouseData); @@ -1090,12 +1097,6 @@ static enum ConfigStatus configure(struct Inst * this) static void deconfigure(struct Inst * this) { - if (this->hasTextures) - { - glDeleteTextures(TEXTURE_COUNT, this->textures); - this->hasTextures = false; - } - if (this->hasFrames) { glDeleteTextures(BUFFER_COUNT, this->frames);