Skip to content

Commit

Permalink
Probe only for OpenGL levels available in this Qt version
Browse files Browse the repository at this point in the history
Each version of Qt supports a set of OpenGL levels; the level displayed
to the user is only as high as what was supported at compile-time. Hence
it should be harmless to degrade gracefully to previous Qt versions.
  • Loading branch information
rolk committed Jul 6, 2012
1 parent ec7057e commit 0d17997
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion VisualizationModules/LibGuiQt/cvfqtBasicAboutDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,13 @@ QString BasicAboutDialog::openGLVersionString() const

QGLFormat::OpenGLVersionFlags flags = QGLFormat::openGLVersionFlags();

if (flags & QGLFormat::OpenGL_Version_4_0 ) versionString += "4.0";
if (false) ;
#if (QT_VERSION >= QT_VERSION_CHECK(4, 7, 0))
else if (flags & QGLFormat::OpenGL_Version_4_0 ) versionString += "4.0";
else if (flags & QGLFormat::OpenGL_Version_3_3 ) versionString += "3.3";
else if (flags & QGLFormat::OpenGL_Version_3_2 ) versionString += "3.2";
else if (flags & QGLFormat::OpenGL_Version_3_1 ) versionString += "3.1";
#endif /* QT_VERSION > 4.7 */
else if (flags & QGLFormat::OpenGL_Version_3_0 ) versionString += "3.0";
else if (flags & QGLFormat::OpenGL_ES_Version_2_0 ) versionString += "ES_Version 2.0";
else if (flags & QGLFormat::OpenGL_ES_CommonLite_Version_1_1) versionString += "ES_CommonLite_Version 1.1";
Expand Down

0 comments on commit 0d17997

Please sign in to comment.