mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 04:00:57 -06:00
Probe only for OpenGL levels available in this Qt version
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.
This commit is contained in:
parent
ec7057eb78
commit
0d17997eb3
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user