diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-05-03 11:21:54 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-05-03 11:26:07 (GMT) |
commit | 28659c21d12a267b10e5b441bf4c776e04d69bdc (patch) | |
tree | 93574d2a7dd6ec03775ea4faacca8464f1b47efa /src | |
parent | f275b24b3c38359ab0fedab340bad230d764a0d1 (diff) | |
download | Qt-28659c21d12a267b10e5b441bf4c776e04d69bdc.zip Qt-28659c21d12a267b10e5b441bf4c776e04d69bdc.tar.gz Qt-28659c21d12a267b10e5b441bf4c776e04d69bdc.tar.bz2 |
Fixed OpenGL version flags for versions > 3.2.
If the system supports an OpenGL version higher than what is
recognized by Qt, all the version flags up to 3.2 should be set.
Reviewed-by: Trond
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/qgl.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 7abf4bc..cfacf26 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1259,11 +1259,24 @@ QGLFormat::OpenGLVersionFlags Q_AUTOTEST_EXPORT qOpenGLVersionFlagsFromString(co versionFlags |= QGLFormat::OpenGL_Version_3_2; case '1': versionFlags |= QGLFormat::OpenGL_Version_3_1; + case '0': + break; default: + versionFlags |= QGLFormat::OpenGL_Version_3_1 | + QGLFormat::OpenGL_Version_3_2; break; } } else { - qWarning("Unrecognised OpenGL version"); + 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 | + QGLFormat::OpenGL_Version_3_1 | + QGLFormat::OpenGL_Version_3_2; } } return versionFlags; |