From a300330203790b41a12a27dc4341b57ae81fd29e Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 7 Dec 2016 13:13:47 +0100 Subject: Make sure we call glClearDepth(double) on desktop GL Task-number: QTBUG-56798 Change-Id: I028510c0f75df5c7d2dce539c32ea503009467db Reviewed-by: Laszlo Agocs Reviewed-by: Bruno de Oliveira Abinader --- src/gui/opengl/qopenglfunctions.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp index e4e7c6d1b5..ad8b19a2bc 100644 --- a/src/gui/opengl/qopenglfunctions.cpp +++ b/src/gui/opengl/qopenglfunctions.cpp @@ -2196,9 +2196,10 @@ QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext *c) #ifndef QT_OPENGL_ES_2 // setup fallbacks in case some methods couldn't get resolved - if (!f.ClearDepthf) + bool es = QOpenGLContext::currentContext()->isOpenGLES(); + if (!f.ClearDepthf || !es) f.ClearDepthf = qopenglfSpecialClearDepthf; - if (!f.DepthRangef) + if (!f.DepthRangef || !es) f.DepthRangef = qopenglfSpecialDepthRangef; if (!f.GetShaderPrecisionFormat) f.GetShaderPrecisionFormat = qopenglfSpecialGetShaderPrecisionFormat; -- cgit v1.2.3