Re-enable depth clamping

This commit is contained in:
Emile Belanger 2021-10-24 10:52:42 +01:00 committed by Christoph Oelckers
parent f0f0ca020b
commit ff009cbf7a
3 changed files with 10 additions and 4 deletions

View file

@ -724,10 +724,13 @@ void FGLRenderState::ClearScreen()
bool FGLRenderState::SetDepthClamp(bool on)
{
bool res = mLastDepthClamp;
/*
if (!on) glDisable(GL_DEPTH_CLAMP);
else glEnable(GL_DEPTH_CLAMP);
*/
if (gles.depthClampAvailable)
{
if (!on) glDisable(GL_DEPTH_CLAMP);
else glEnable(GL_DEPTH_CLAMP);
}
mLastDepthClamp = on;
return res;
}

View file

@ -182,10 +182,12 @@ namespace OpenGLESRenderer
#if USE_GLES2
gles.depthStencilAvailable = CheckExtension("GL_OES_packed_depth_stencil");
gles.npotAvailable = CheckExtension("GL_OES_texture_npot");
gles.depthClampAvailable = CheckExtension("GL_EXT_depth_clamp")
#else
gles.depthStencilAvailable = true;
gles.npotAvailable = true;
gles.useMappedBuffers = true;
gles.depthClampAvailable = true;
#endif
gles.numlightvectors = (gles.maxlights * LIGHT_VEC4_NUM);

View file

@ -69,6 +69,7 @@ namespace OpenGLESRenderer
bool depthStencilAvailable;
bool npotAvailable;
bool forceGLSLv100;
bool depthClampAvailable;
int max_texturesize;
char* vendorstring;
char* modelstring;