From bd383fe2191da416c62ab0ae2e642eac834f58c2 Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 20 Oct 2018 12:48:03 +0200 Subject: [PATCH] Tweak for OpenGL 2.1 Why am I still supporting this??? --- src/rlgl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rlgl.h b/src/rlgl.h index 96c91d020..d97d888e1 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -1509,7 +1509,7 @@ void rlDeleteRenderTextures(RenderTexture2D target) if (target.texture.id > 0) glDeleteTextures(1, &target.texture.id); if (target.depth.id > 0) { -#if defined(GRAPHICS_API_OPENGL_ES2) +#if defined(GRAPHICS_API_OPENGL_21) || defined(GRAPHICS_API_OPENGL_ES2) glDeleteRenderbuffers(1, &target.depth.id); #elif defined(GRAPHICS_API_OPENGL_33) glDeleteTextures(1, &target.depth.id); @@ -2262,9 +2262,9 @@ RenderTexture2D rlLoadRenderTexture(int width, int height) if (target.texture.id > 0) glDeleteTextures(1, &target.texture.id); if (target.depth.id > 0) { -#if defined(GRAPHICS_API_OPENGL_ES2) +#if defined(USE_DEPTH_RENDERBUFFER) glDeleteRenderbuffers(1, &target.depth.id); -#elif defined(GRAPHICS_API_OPENGL_33) +#elif defined(USE_DEPTH_TEXTURE) glDeleteTextures(1, &target.depth.id); #endif }