aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-11-15 10:55:46 +0100
committerLiang Qi <liang.qi@qt.io>2016-11-15 10:57:49 +0100
commit365a3ac6ae50eb53253eca92bfdf4c527b3a5c05 (patch)
treec6fa0bf4ccf698fa75e2ebc245f95e424438b13a /src/particles
parentdaa866a196962beb6171f847bd6f691f3ae38300 (diff)
parent8ff69297eeddc3f5650c4cc5517c7e2eafaf6c59 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/qmldevtools/qmldevtools.pro tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp Change-Id: I12255c16716bd8a74e7047cdb1f9302a4d1ea827
Diffstat (limited to 'src/particles')
-rw-r--r--src/particles/qquickimageparticle.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp
index 07cbee1383..84536183ec 100644
--- a/src/particles/qquickimageparticle.cpp
+++ b/src/particles/qquickimageparticle.cpp
@@ -1291,14 +1291,16 @@ void QQuickImageParticle::finishBuildParticleNodes(QSGNode** node)
// OS X 10.8.3 introduced a bug in the AMD drivers, for at least the 2011 macbook pros,
// causing point sprites who read gl_PointCoord in the frag shader to come out as
// green-red blobs.
- if (perfLevel < Deformable && strstr((char *) glGetString(GL_VENDOR), "ATI")) {
+ const GLubyte *glVendor = QOpenGLContext::currentContext()->functions()->glGetString(GL_VENDOR);
+ if (perfLevel < Deformable && glVendor && strstr((char *) glVendor, "ATI")) {
perfLevel = Deformable;
}
#endif
#ifdef Q_OS_LINUX
// Nouveau drivers can potentially freeze a machine entirely when taking the point-sprite path.
- if (perfLevel < Deformable && strstr((const char *) glGetString(GL_VENDOR), "nouveau"))
+ const GLubyte *glVendor = QOpenGLContext::currentContext()->functions()->glGetString(GL_VENDOR);
+ if (perfLevel < Deformable && glVendor && strstr((const char *) glVendor, "nouveau"))
perfLevel = Deformable;
#endif