Fix check for glClipControl to check extension not just function pointer

This commit is contained in:
baldurk
2017-01-17 16:54:18 +00:00
parent 6be852bfa2
commit 031ea659be
2 changed files with 3 additions and 5 deletions
+2 -4
View File
@@ -1665,8 +1665,7 @@ struct RenderTextState
gl.glDisable(eGL_ALPHA_TEST);
}
if(modern && gl.glClipControl &&
(GLCoreVersion >= 45 || HasExt[ARB_clip_control])) // only available in 4.5+
if(modern && gl.glClipControl && (GLCoreVersion >= 45 || HasExt[ARB_clip_control]))
gl.glClipControl(ClipOrigin, ClipDepth);
if(modern && HasExt[ARB_draw_buffers_blend])
@@ -1857,8 +1856,7 @@ void WrappedOpenGL::RenderOverlayStr(float x, float y, const char *text)
}
gl.glPolygonMode(eGL_FRONT_AND_BACK, eGL_FILL);
if(gl.glClipControl &&
(GLCoreVersion >= 45 || HasExt[ARB_clip_control])) // only available in 4.5+
if(gl.glClipControl && (GLCoreVersion >= 45 || HasExt[ARB_clip_control]))
gl.glClipControl(eGL_LOWER_LEFT, eGL_NEGATIVE_ONE_TO_ONE);
// bind UBOs
+1 -1
View File
@@ -1154,7 +1154,7 @@ void GLRenderState::ApplyState(void *ctx, WrappedOpenGL *gl)
m_Real->glPointSize(PointSize);
m_Real->glPrimitiveRestartIndex(PrimitiveRestartIndex);
if(m_Real->glClipControl) // only available in 4.5+
if(m_Real->glClipControl && HasExt[ARB_clip_control])
m_Real->glClipControl(ClipOrigin, ClipDepth);
m_Real->glProvokingVertex(ProvokingVertex);