[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.
This commit is contained in:
Geoffrey McRae 2021-07-02 19:50:31 +10:00
parent 212cc32097
commit 9cbc255448

View File

@ -279,6 +279,13 @@ void opengl_deinitialize(void * opaque)
} }
deconfigure(this); deconfigure(this);
if (this->hasTextures)
{
glDeleteTextures(TEXTURE_COUNT, this->textures);
this->hasTextures = false;
}
if (this->mouseData) if (this->mouseData)
free(this->mouseData); free(this->mouseData);
@ -1090,12 +1097,6 @@ static enum ConfigStatus configure(struct Inst * this)
static void deconfigure(struct Inst * this) static void deconfigure(struct Inst * this)
{ {
if (this->hasTextures)
{
glDeleteTextures(TEXTURE_COUNT, this->textures);
this->hasTextures = false;
}
if (this->hasFrames) if (this->hasFrames)
{ {
glDeleteTextures(BUFFER_COUNT, this->frames); glDeleteTextures(BUFFER_COUNT, this->frames);