aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/particles/qsgcustomparticle.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2011-09-01 15:27:05 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-07 09:26:15 +0200
commitca6d931bb7714de7293dab5d14a19f74dc98d103 (patch)
tree46b860a2dc0a352877420e7d58ab4324b2511242 /src/declarative/particles/qsgcustomparticle.cpp
parentb04f4207d9070b29221eec8fb3206ba8510b2004 (diff)
Animation-like API for ParticleSystem
Includes skipping rendering when paused. Change-Id: I353ac415fb877917d46ba1832ad9cb5a84640b57 Reviewed-on: http://codereview.qt.nokia.com/4041 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/declarative/particles/qsgcustomparticle.cpp')
-rw-r--r--src/declarative/particles/qsgcustomparticle.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/declarative/particles/qsgcustomparticle.cpp b/src/declarative/particles/qsgcustomparticle.cpp
index 11bc7e35fb..00e3ec185b 100644
--- a/src/declarative/particles/qsgcustomparticle.cpp
+++ b/src/declarative/particles/qsgcustomparticle.cpp
@@ -413,13 +413,14 @@ QSGNode *QSGCustomParticle::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDat
m_dirtyData = false;
}
- if (m_system && m_system->isRunning())
+ if (m_system && m_system->isRunning() && !m_system->isPaused()){
prepareNextFrame();
- if (m_rootNode){
- update();
- //### Should I be using dirty geometry too/instead?
- foreach (QSGShaderEffectNode* node, m_nodes)
- node->markDirty(QSGNode::DirtyMaterial); //done in buildData?
+ if (m_rootNode) {
+ update();
+ //### Should I be using dirty geometry too/instead?
+ foreach (QSGGeometryNode* node, m_nodes)
+ node->markDirty(QSGNode::DirtyMaterial);//done in buildData?
+ }
}
return m_rootNode;