summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglfunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/opengl/qopenglfunctions.cpp')
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp5
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;