summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@theqtcompany.com>2015-04-30 15:09:59 +0200
committerAndy Shaw <andy.shaw@theqtcompany.com>2015-05-11 07:15:46 +0000
commita1ada382ff00a8e1599aba22ee06ff53ce478666 (patch)
tree9e59dbe10e89bf95dae66b0c1a7a35fe65960a22 /src
parent3545ef41217e3ce4d1bea2b07793fa7a8c1058a6 (diff)
Handle parsing of GL_VERSION as reported by Nexus 6
The Nexus 6 device reports a GL_VERSION which is strictly not conformant to what is expected from GL_VERSION, so a check is added for this case so that it correctly detects the right OpenGL ES version. Change-Id: I00297dd7c1e505dd7f9ab8a7fa480f514162b488 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qplatformopenglcontext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformopenglcontext.cpp b/src/gui/kernel/qplatformopenglcontext.cpp
index 527bfdd983..364c1a5c0e 100644
--- a/src/gui/kernel/qplatformopenglcontext.cpp
+++ b/src/gui/kernel/qplatformopenglcontext.cpp
@@ -121,6 +121,10 @@ bool QPlatformOpenGLContext::parseOpenGLVersion(const QByteArray &versionString,
if (versionParts.size() >= 2) {
major = versionParts.at(0).toInt(&majorOk);
minor = versionParts.at(1).toInt(&minorOk);
+ // Nexus 6 has "OpenGL ES 3.0V@95.0 (GIT@I86da836d38)"
+ if (!minorOk)
+ if (int idx = versionParts.at(1).indexOf('V'))
+ minor = versionParts.at(1).left(idx).toInt(&minorOk);
} else {
qWarning("Unrecognized OpenGL ES version");
}