From 2c86c4e94268c28a2537c3ac6b2a418a38f1ccf6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 15 Jul 2018 10:55:34 +0200 Subject: [PATCH] - fixed: When deleting a camera texture's depth buffer, the corresponding variable must also be cleared. Thanks to OpenGL's messed up state system this didn't cause some clear failure but just reused the last bound buffer instead which may not have had a matching size. --- src/gl/textures/gl_hwtexture.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gl/textures/gl_hwtexture.cpp b/src/gl/textures/gl_hwtexture.cpp index e035734f9..3120192c7 100644 --- a/src/gl/textures/gl_hwtexture.cpp +++ b/src/gl/textures/gl_hwtexture.cpp @@ -353,6 +353,7 @@ void FHardwareTexture::Clean(bool all) } glTex_Translated.Clear(); if (glDepthID != 0) glDeleteRenderbuffers(1, &glDepthID); + glDepthID = 0; } //===========================================================================