Use triangle strips for particles on Mac OS X, ATI cards.
authorGunnar Sletta <gunnar.sletta@digia.com>
Thu, 11 Apr 2013 12:20:57 +0000 (14:20 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 16 Apr 2013 09:35:24 +0000 (11:35 +0200)
Change-Id: Ie831fc6f8f8cdd891c15dc028383b191662416fc
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
src/particles/qquickimageparticle.cpp

index e0572ef..d571641 100644 (file)
@@ -1363,6 +1363,15 @@ void QQuickImageParticle::finishBuildParticleNodes()
         perfLevel = Deformable;
 #endif
 
+#ifdef Q_OS_MAC
+    // Mac 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")) {
+        perfLevel = Deformable;
+    }
+#endif
+
     if (perfLevel >= Colored  && !m_color.isValid())
         m_color = QColor(Qt::white);//Hidden default, but different from unset