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>
bb10
Gunnar Sletta 2016-12-07 13:13:47 +01:00 committed by Laszlo Agocs
parent 287f548d4c
commit a300330203
1 changed files with 3 additions and 2 deletions

View File

@ -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;