mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-09 20:50:43 +00:00
Fix 3 segment opengl versions
This commit is contained in:
parent
5aebc3ade1
commit
ba51fcc8e3
@ -86,6 +86,15 @@ float getOpenGLVersion()
|
|||||||
bool ok;
|
bool ok;
|
||||||
float v = glversion.toFloat(&ok);
|
float v = glversion.toFloat(&ok);
|
||||||
|
|
||||||
|
if (!ok) {
|
||||||
|
QString tmp = glversion.section(".",0,1);
|
||||||
|
v = tmp.toFloat(&ok);
|
||||||
|
if (!ok) {
|
||||||
|
// just look at major, we are only interested in whether we have OpenGL 2.0 anyway
|
||||||
|
tmp = glversion.section(".",0,0);
|
||||||
|
v = tmp.toFloat(&ok);
|
||||||
|
}
|
||||||
|
}
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user