mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-22 11:18:15 +00:00
Tweak for OpenGL 2.1
Why am I still supporting this???
This commit is contained in:
@@ -1509,7 +1509,7 @@ void rlDeleteRenderTextures(RenderTexture2D target)
|
|||||||
if (target.texture.id > 0) glDeleteTextures(1, &target.texture.id);
|
if (target.texture.id > 0) glDeleteTextures(1, &target.texture.id);
|
||||||
if (target.depth.id > 0)
|
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);
|
glDeleteRenderbuffers(1, &target.depth.id);
|
||||||
#elif defined(GRAPHICS_API_OPENGL_33)
|
#elif defined(GRAPHICS_API_OPENGL_33)
|
||||||
glDeleteTextures(1, &target.depth.id);
|
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.texture.id > 0) glDeleteTextures(1, &target.texture.id);
|
||||||
if (target.depth.id > 0)
|
if (target.depth.id > 0)
|
||||||
{
|
{
|
||||||
#if defined(GRAPHICS_API_OPENGL_ES2)
|
#if defined(USE_DEPTH_RENDERBUFFER)
|
||||||
glDeleteRenderbuffers(1, &target.depth.id);
|
glDeleteRenderbuffers(1, &target.depth.id);
|
||||||
#elif defined(GRAPHICS_API_OPENGL_33)
|
#elif defined(USE_DEPTH_TEXTURE)
|
||||||
glDeleteTextures(1, &target.depth.id);
|
glDeleteTextures(1, &target.depth.id);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user