diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-08-16 02:19:06 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-08-16 02:22:56 (GMT) |
commit | 0a94e2af3c29afa6e8d7ae3041bed4f187b3c1ca (patch) | |
tree | 675f2da4f2d4d3c05afdec42183d3c76b53c0523 /src/opengl/qgl.cpp | |
parent | 36a98407ce53e2d7ae6f1ef3b65794b113ae1606 (diff) | |
download | Qt-0a94e2af3c29afa6e8d7ae3041bed4f187b3c1ca.zip Qt-0a94e2af3c29afa6e8d7ae3041bed4f187b3c1ca.tar.gz Qt-0a94e2af3c29afa6e8d7ae3041bed4f187b3c1ca.tar.bz2 |
Fix OpenGLVersionFlags on OpenGL 4.0 systems
If the OpenGL version was 4.0 or higher, the flags for 1.1, 1.5, 2.0,
and so on were not being set. This lead to the flags indicating that
older OpenGL versions were not supported when they clearly were.
Back port parts of 28659c21d12a267b10e5b441bf4c776e04d69bdc from Qt 4.7
to fix this in Qt 4.6.
Task-number: QTBUG-12554
Reviewed-by: Sarah Smith
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 0137c85..81e55b3 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1173,8 +1173,16 @@ QGLFormat::OpenGLVersionFlags Q_AUTOTEST_EXPORT qOpenGLVersionFlagsFromString(co QGLFormat::OpenGL_Version_2_1 | QGLFormat::OpenGL_Version_3_0; } - else - qWarning("Unrecognised OpenGL version"); + else { + versionFlags |= QGLFormat::OpenGL_Version_1_1 | + QGLFormat::OpenGL_Version_1_2 | + QGLFormat::OpenGL_Version_1_3 | + QGLFormat::OpenGL_Version_1_4 | + QGLFormat::OpenGL_Version_1_5 | + QGLFormat::OpenGL_Version_2_0 | + QGLFormat::OpenGL_Version_2_1 | + QGLFormat::OpenGL_Version_3_0; + } } return versionFlags; } |