Make titlebar show active graphics engine (Open GL, ANGLE, or LegacyGFX).

This commit is contained in:
Seeker4 2019-05-03 17:26:08 -07:00 committed by Guy Scharf
parent 256746b723
commit 90b6db3b3f

View File

@ -151,6 +151,11 @@ float getOpenGLVersion()
#endif #endif
} }
// Obtains graphic engine as a string, for use in title bar
// This is a bad approach as it depends on the exact version
// id strings to distinguish engines.
// (But too much work to find an alternate solution today)
// This works on Windows. Don't know about other platforms.
QString getGraphicsEngine() QString getGraphicsEngine()
{ {
QString gfxEngine = QString(); QString gfxEngine = QString();
@ -158,8 +163,11 @@ QString getGraphicsEngine()
gfxEngine = CSTR_GFX_BrokenGL; gfxEngine = CSTR_GFX_BrokenGL;
#else #else
QString glversion = getOpenGLVersionString(); QString glversion = getOpenGLVersionString();
qDebug() << glversion << glversion;
if (glversion.contains(CSTR_GFX_ANGLE)) { if (glversion.contains(CSTR_GFX_ANGLE)) {
gfxEngine = CSTR_GFX_ANGLE; gfxEngine = CSTR_GFX_ANGLE;
} else if (glversion.contains("Mesa")) {
gfxEngine = CSTR_GFX_BrokenGL;
} else { } else {
gfxEngine = CSTR_GFX_OpenGL; gfxEngine = CSTR_GFX_OpenGL;
} }