Skip to content

Commit

Permalink
Make sure we call glClearDepth(double) on desktop GL
Browse files Browse the repository at this point in the history
Task-number: QTBUG-56798
Change-Id: I028510c0f75df5c7d2dce539c32ea503009467db
Reviewed-by: Laszlo Agocs <[email protected]>
Reviewed-by: Bruno de Oliveira Abinader <[email protected]>
  • Loading branch information
sletta authored and alpqr committed Jan 19, 2017
1 parent 287f548 commit a300330
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/opengl/qopenglfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a300330

Please sign in to comment.