Lift particle limits on desktop
authorAlan Alpert <alan.alpert@nokia.com>
Tue, 23 Aug 2011 03:08:08 +0000 (13:08 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 24 Aug 2011 10:27:43 +0000 (12:27 +0200)
Change-Id: I65d897273cd0e3a2ea58c78b0cde08a388506f84
Reviewed-on: http://codereview.qt.nokia.com/3355
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>

src/declarative/particles/qsgcustomparticle.cpp
src/declarative/particles/qsgimageparticle.cpp

index ae6c269..2d86306 100644 (file)
@@ -411,10 +411,12 @@ void QSGCustomParticle::prepareNextFrame(){
 
 QSGShaderEffectNode* QSGCustomParticle::buildCustomNodes()
 {
+#ifdef QT_OPENGL_ES_2
     if (m_count * 4 > 0xffff) {
-        printf("CustomParticle: Too many particles... \n");//####Why is this here?
+        printf("CustomParticle: Too many particles... \n");
         return 0;
     }
+#endif
 
     if (m_count <= 0) {
         printf("CustomParticle: Too few particles... \n");
index 3b58bfc..57461a4 100644 (file)
@@ -846,10 +846,12 @@ static QSGGeometry::AttributeSet SpriteParticle_AttributeSet =
 
 QSGGeometryNode* QSGImageParticle::buildParticleNodes()
 {
-    if (m_count * 4 > 0xffff) {//TODO: Lift this limit for desktop?
+#ifdef QT_OPENGL_ES_2
+    if (m_count * 4 > 0xffff) {
         printf("ImageParticle: Too many particles - maximum 16,000 per ImageParticle.\n");//ES 2 vertex count limit is ushort
         return 0;
     }
+#endif
 
     if (count() <= 0)
         return 0;