From cb2ba3675c3928a2937f84e4c6503a659375ca0a Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 24 Feb 2023 16:19:25 +0100 Subject: [PATCH] REVIEWED: `rlUnloadFramebuffer()` #2937 --- src/rlgl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rlgl.h b/src/rlgl.h index f7d73edaf..7e9fee68a 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -3473,7 +3473,7 @@ void rlUnloadFramebuffer(unsigned int id) unsigned int depthIdU = (unsigned int)depthId; if (depthType == GL_RENDERBUFFER) glDeleteRenderbuffers(1, &depthIdU); - else if (depthType == GL_RENDERBUFFER) glDeleteTextures(1, &depthIdU); + else if (depthType == GL_TEXTURE) glDeleteTextures(1, &depthIdU); // NOTE: If a texture object is deleted while its image is attached to the *currently bound* framebuffer, // the texture image is automatically detached from the currently bound framebuffer.