From 28659c21d12a267b10e5b441bf4c776e04d69bdc Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Mon, 3 May 2010 13:21:54 +0200 Subject: 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 --- src/opengl/qgl.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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; -- cgit v0.12