From 06c5b17617cd5b3dee8da23eaedba12924e8ea67 Mon Sep 17 00:00:00 2001 From: SlateyDev Date: Tue, 20 Jan 2026 20:31:40 +1100 Subject: [PATCH] fix so ES2 isn't broken with the change --- src/rlgl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rlgl.h b/src/rlgl.h index 41421c1dd..37ede76a0 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -3429,7 +3429,11 @@ unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer) { if (RLGL.ExtSupported.maxDepthBits == 32) glInternalFormat = GL_DEPTH_COMPONENT32_OES; else if (RLGL.ExtSupported.maxDepthBits == 24) glInternalFormat = GL_DEPTH_COMPONENT24_OES; +#if !defined(GRAPHICS_API_OPENGL_ES3) + else if (useRenderBuffer) glInternalFormat = GL_DEPTH_COMPONENT16; +#else else glInternalFormat = GL_DEPTH_COMPONENT16; +#endif } #endif