aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/particles
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-08-31 14:03:16 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-08-31 14:03:16 +0200
commit20c3575fc39004d6a556820543982f4a6ebef0be (patch)
tree9d8be9faae42972c85f0e296cc6dcaf27c3fcc4e /src/declarative/particles
parent71478352376022faa9be6d79f2a760c289945ff5 (diff)
parent3108a36914d59d8a0d15bfdb2b5bbb09aa6e54a2 (diff)
Merge remote-tracking branch 'origin/master' into refactor
Conflicts: src/declarative/declarative.pro Change-Id: I9c6d8447e1254c6acd32fa0775ff6a79d0d66acd
Diffstat (limited to 'src/declarative/particles')
-rw-r--r--src/declarative/particles/qsgimageparticle.cpp4
-rw-r--r--src/declarative/particles/qsgpointattractor_p.h22
2 files changed, 12 insertions, 14 deletions
diff --git a/src/declarative/particles/qsgimageparticle.cpp b/src/declarative/particles/qsgimageparticle.cpp
index 853a08a890..f269895536 100644
--- a/src/declarative/particles/qsgimageparticle.cpp
+++ b/src/declarative/particles/qsgimageparticle.cpp
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
//###Switch to define later, for now user-friendly (no compilation) debugging is worth it
DEFINE_BOOL_CONFIG_OPTION(qmlParticlesDebug, QML_PARTICLES_DEBUG)
-#ifdef Q_WS_MAC
+#ifndef QT_OPENGL_ES_2
#define SHADER_DEFINES "#version 120\n"
#else
#define SHADER_DEFINES ""
@@ -864,7 +864,7 @@ QSGGeometryNode* QSGImageParticle::buildParticleNodes()
} else if (m_autoRotation || m_rotation || m_rotationVariation
|| m_rotationSpeed || m_rotationSpeedVariation) {
perfLevel = Deformable;
- } else if (m_alphaVariation || m_alpha != 1.0 || m_color.isValid()
+ } else if (m_alphaVariation || m_alpha != 1.0 || m_color.isValid() || m_color_variation
|| m_redVariation || m_blueVariation || m_greenVariation) {
perfLevel = Colored;
} else {
diff --git a/src/declarative/particles/qsgpointattractor_p.h b/src/declarative/particles/qsgpointattractor_p.h
index 298965a5c9..e2cdd0fdca 100644
--- a/src/declarative/particles/qsgpointattractor_p.h
+++ b/src/declarative/particles/qsgpointattractor_p.h
@@ -52,11 +52,9 @@ QT_MODULE(Declarative)
class QSGPointAttractorAffector : public QSGParticleAffector
{
Q_OBJECT
- //Like Gravitational singularity, but linear to distance instead of quadratic
- //And affects ds/dt, not da/dt
Q_PROPERTY(qreal strength READ strength WRITE setStrength NOTIFY strengthChanged)
- Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)//TODO: Change to pointX, pointY
- Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
+ Q_PROPERTY(qreal pointX READ pointX WRITE setPointX NOTIFY pointXChanged)
+ Q_PROPERTY(qreal pointY READ pointY WRITE setPointY NOTIFY pointYChanged)
Q_PROPERTY(PhysicsAffects physics READ physics WRITE setPhysics NOTIFY physicsChanged)
Q_PROPERTY(Proportion proportionalToDistance READ proportionalToDistance WRITE setProportionalToDistance NOTIFY proportionalToDistanceChanged)
Q_ENUMS(PhysicsAffects)
@@ -84,12 +82,12 @@ public:
return m_strength;
}
- qreal x() const
+ qreal pointX() const
{
return m_x;
}
- qreal y() const
+ qreal pointY() const
{
return m_y;
}
@@ -108,9 +106,9 @@ signals:
void strengthChanged(qreal arg);
- void xChanged(qreal arg);
+ void pointXChanged(qreal arg);
- void yChanged(qreal arg);
+ void pointYChanged(qreal arg);
void physicsChanged(PhysicsAffects arg);
@@ -125,19 +123,19 @@ void setStrength(qreal arg)
}
}
-void setX(qreal arg)
+void setPointX(qreal arg)
{
if (m_x != arg) {
m_x = arg;
- emit xChanged(arg);
+ emit pointXChanged(arg);
}
}
-void setY(qreal arg)
+void setPointY(qreal arg)
{
if (m_y != arg) {
m_y = arg;
- emit yChanged(arg);
+ emit pointYChanged(arg);
}
}
void setPhysics(PhysicsAffects arg)