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 FGLRenderState::SetDepthClamp(bool on)
{ {
bool res = mLastDepthClamp; bool res = mLastDepthClamp;
/*
if (gles.depthClampAvailable)
{
if (!on) glDisable(GL_DEPTH_CLAMP); if (!on) glDisable(GL_DEPTH_CLAMP);
else glEnable(GL_DEPTH_CLAMP); else glEnable(GL_DEPTH_CLAMP);
*/ }
mLastDepthClamp = on; mLastDepthClamp = on;
return res; return res;
} }

View file

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

View file

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