summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2023-01-04 17:35:51 +0100
committerRay <[email protected]>2023-01-04 17:35:51 +0100
commit89755e52bf066e66dcfac2f2f52f6806ff02a693 (patch)
treed92e5ae5fdd612525f2016f693c5e1638946ee4d /src
parent73234d2a28166ca65cd10c01b0233a667e5290c1 (diff)
downloadraylib-89755e52bf066e66dcfac2f2f52f6806ff02a693.tar.gz
raylib-89755e52bf066e66dcfac2f2f52f6806ff02a693.zip
REVIEWED: `rLoadTextureDepth()` fixed issue
Diffstat (limited to 'src')
-rw-r--r--src/rlgl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 07292555..a7226a81 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -2993,7 +2993,7 @@ unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer)
#if defined(GRAPHICS_API_OPENGL_ES2)
// WARNING: WebGL platform requires unsized internal format definition (GL_DEPTH_COMPONENT)
// while other platforms using OpenGL ES 2.0 require/support sized internal formats depending on the GPU capabilities
- if (!RLGL.ExtSupported.texDepthWebGL)
+ if (!RLGL.ExtSupported.texDepthWebGL || useRenderBuffer)
{
if (RLGL.ExtSupported.maxDepthBits == 32) glInternalFormat = GL_DEPTH_COMPONENT32_OES;
else if (RLGL.ExtSupported.maxDepthBits == 24) glInternalFormat = GL_DEPTH_COMPONENT24_OES;