fix so ES2 isn't broken with the change

This commit is contained in:
SlateyDev 2026-01-20 20:31:40 +11:00
parent 82946e6969
commit 06c5b17617

View File

@ -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