sanitize GL version stringlist
BUG: 265131
This commit is contained in:
parent
c513099354
commit
b65f05f42b
1 changed files with 3 additions and 2 deletions
|
@ -94,9 +94,10 @@ void initGL()
|
|||
// Get OpenGL version
|
||||
QString glversionstring = QString((const char*)glGetString(GL_VERSION));
|
||||
QStringList glversioninfo = glversionstring.left(glversionstring.indexOf(' ')).split('.');
|
||||
while (glversioninfo.count() < 3)
|
||||
glversioninfo << "0";
|
||||
#ifndef KWIN_HAVE_OPENGLES
|
||||
glVersion = MAKE_GL_VERSION(glversioninfo[0].toInt(), glversioninfo[1].toInt(),
|
||||
glversioninfo.count() > 2 ? glversioninfo[2].toInt() : 0);
|
||||
glVersion = MAKE_GL_VERSION(glversioninfo[0].toInt(), glversioninfo[1].toInt(), glversioninfo[2].toInt());
|
||||
#endif
|
||||
// Get list of supported OpenGL extensions
|
||||
glExtensions = QString((const char*)glGetString(GL_EXTENSIONS)).split(' ');
|
||||
|
|
Loading…
Reference in a new issue