diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-04-01 13:25:18 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-01 19:18:43 +0200 |
commit | d8281a92b8eb1c5fa3e430c296f22a713cbe1808 (patch) | |
tree | 266c1858f819f395a16e563e27cabee4a48976cf /src | |
parent | 0a86c3127241aed93be62c62c3927e9383c95fd1 (diff) |
Do not set fwdcompat bit for a compatibility profile QGLFormat
AMD drivers do weird things. Provide a workaround.
Task-number: QTBUG-37909
Change-Id: Idabd6ebb6e1447cb9bd92c7711a50aaa8575b9d6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/qgl_qpa.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp index fe4d1c363c..10e6ffde46 100644 --- a/src/opengl/qgl_qpa.cpp +++ b/src/opengl/qgl_qpa.cpp @@ -109,6 +109,11 @@ QSurfaceFormat QGLFormat::toSurfaceFormat(const QGLFormat &format) retFormat.setMajorVersion(format.majorVersion()); retFormat.setMinorVersion(format.minorVersion()); retFormat.setProfile(static_cast<QSurfaceFormat::OpenGLContextProfile>(format.profile())); + // QGLFormat has no way to set DeprecatedFunctions, that is, to tell that forward + // compatibility should not be requested. Some drivers fail to ignore the fwdcompat + // bit with compatibility profiles so make sure it is not set. + if (format.profile() == QGLFormat::CompatibilityProfile) + retFormat.setOption(QSurfaceFormat::DeprecatedFunctions); return retFormat; } |