diff options
author | Gunnar Sletta <gunnar@sletta.org> | 2016-12-07 13:13:47 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-01-19 14:52:25 +0000 |
commit | a300330203790b41a12a27dc4341b57ae81fd29e (patch) | |
tree | f40324971030fac6516b9388ee37fe3d4b4ecb0d /src/gui | |
parent | 287f548d4c7cc594ffecc9c050dc5ec9fdaa6d37 (diff) |
Make sure we call glClearDepth(double) on desktop GL
Task-number: QTBUG-56798
Change-Id: I028510c0f75df5c7d2dce539c32ea503009467db
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Bruno de Oliveira Abinader <brunoabinader@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/opengl/qopenglfunctions.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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; |