aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/particles/qsgcustomparticle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename QSG* to QQuick* in particles folderAlan Alpert2011-10-251-596/+0
| | | | | Change-Id: I793eaf16f3810df0cb0f9f8482ac0b9d6137595d Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Rename Qt Quick-specific classes to QQuick*Kent Hansen2011-10-211-12/+12
| | | | | | | | | | | | | | | | | | | | | | The QSG (SceneGraph) prefix is too generic for Qt Quick(2)-specific classes. All the classes and files in the declarative/items directory have been renamed. In particular, for classes that are currently public, the renaming is as follows: QSGView --> QQuickView QSGCanvas --> QQuickCanvas QSGItem --> QQuickItem QSGPaintedItem --> QQuickPaintedItem The header files have been renamed accordingly (e.g. qsgview.h --> qquickview.h). Change-Id: Iac937fff81db20bb639486a793c3aeb5230b038c Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Initial commit of particle system autotestsAlan Alpert2011-10-031-1/+1
| | | | | | | | | Just some basic autotests for most of the elements. Change-Id: I2d289f38f362a38c69e03ff92154c98db3c4c486 Reviewed-on: http://codereview.qt-project.org/5844 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Refactor ParticleSystem membersAlan Alpert2011-09-301-4/+4
| | | | | | | | | Leave m_ for private members. Change-Id: Ia20565a7af6c5db45923eb349238b94b88472f7b Reviewed-on: http://codereview.qt-project.org/5762 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Better dirty markingAlan Alpert2011-09-291-2/+1
| | | | | | | | | Mark geometry as well per frame, and material when it changes. Change-Id: I67dd68b67f04f2379534b71f3c8a6e367d9d4bd5 Reviewed-on: http://codereview.qt-project.org/5439 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix QSGCustomParticle initializationAlan Alpert2011-09-291-8/+8
| | | | | | | | | | commit was failing because nodes weren't stored yet, which could lead to an apparent loss of particles. Change-Id: Ibde6aa75f6c43e2d485c163820e65e0c6ff8e952 Reviewed-on: http://codereview.qt-project.org/5437 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use m_pleaseReset more consistentlyAlan Alpert2011-09-231-1/+0
| | | | | | | | | | Everyone had their own, and so they could conflict or be randomly un-initialized. Change-Id: Ife2c5d9972b881235e4d3a5e2a33979174de2fbc Reviewed-on: http://codereview.qt-project.org/5370 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* fix declarative to work after broken refactorGunnar Sletta2011-09-131-7/+1
| | | | Change-Id: I5a30f8c45e21344060ea6e61d440d6fea822f9de
* Merge branch 'refactor'Gunnar Sletta2011-09-131-23/+42
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/declarative/items/context2d/qsgcanvasitem.cpp src/declarative/items/context2d/qsgcontext2d.cpp src/declarative/items/context2d/qsgcontext2d_p_p.h src/declarative/particles/qsgcustomparticle.cpp src/declarative/particles/qsgparticlesystem.cpp Change-Id: I24e81d3652368c5031305ffa7f969f9f2c249c6c
| * Merge branch 'master' into refactorGunnar Sletta2011-09-121-51/+56
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/declarative/cppextensions/qwidgets/qwidgets.pro examples/declarative/minehunt/main.cpp examples/declarative/minehunt/minehunt.pro src/declarative/items/context2d/qsgcontext2d.cpp src/declarative/items/qsgflickable.cpp src/declarative/items/qsgtextedit.cpp src/declarative/items/qsgtextinput.cpp src/declarative/particles/qsgangleddirection.cpp src/declarative/particles/qsgcumulativedirection.cpp src/declarative/particles/qsgcumulativedirection_p.h src/declarative/particles/qsgfollowemitter.cpp src/declarative/particles/qsgmodelparticle.cpp src/declarative/particles/qsgparticlesystem.cpp src/qtquick1/util/qdeclarativeview.h tests/auto/declarative/examples/examples.pro tests/auto/declarative/qsgfocusscope/tst_qsgfocusscope.cpp Change-Id: Ib4be2a5e742dee1a399d73da97161736f77448e5
| * | Added QSGGeometry::Attribute::isPosition to give a hint about vertex dataGunnar Sletta2011-09-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also added a QSGGeomtry::sizeOfIndex() function for convenience Change-Id: If1f13afd4c1c5295dcfb00254144ef6b8b8b7878 Reviewed-on: http://codereview.qt.nokia.com/4307 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | Fix export symbols for QtDeclarative and QtQuick1.Friedemann Kleint2011-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build on Windows and compiler warnings. Requires 090ee21eac7257644422e35395194e5fd7fb8efa in qtbase. Change-Id: Ief8da504ccd3e2c2e78644cc9943d685c4302019 Reviewed-on: http://codereview.qt.nokia.com/3988 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * | Merge branch 'master' into refactorGunnar Sletta2011-08-311-20/+49
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/v8 src/declarative/declarative.pro src/declarative/items/qsgcanvas.cpp src/declarative/items/qsgshadereffectsource_p.h src/declarative/items/qsgview.cpp src/declarative/particles/qsgcustomparticle.cpp src/imports/gestures/gestures.pro src/imports/particles/particles.pro src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro src/qtquick1/qtquick1.pro tests/auto/declarative/examples/examples.pro tests/auto/declarative/qsglistview/qsglistview.pro tests/auto/qtquick1/qdeclarativeviewer/qdeclarativeviewer.pro Change-Id: I423344f83e1835116cad531b877fde6e68a8849a
| * \ \ Merge branch 'master' into refactorGunnar Sletta2011-08-251-2/+3
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/declarative/items/qsgcanvas.cpp src/declarative/items/qsgitem.cpp src/declarative/items/qsgtextnode.cpp tests/auto/declarative/examples/examples.pro tools/qmlviewer/qmlviewer.pro Change-Id: Icbb0ef5dc79b658c62fd2b2c25a66c9bb3cbeb10
| * | | | Make textureProvider() a virtual accessor in QSGItem.Gunnar Sletta2011-08-221-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gets us one step closer to a public QSGTextureProvider API. This patch also includes a fix to the material ownership in QSGCustomParticle. Change-Id: I620e3006816db0c37eedf3a20a0d4cbe7a783b82 Reviewed-on: http://codereview.qt.nokia.com/3317 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
| * | | | Reintroduce the QSGTextureProvider as a separate objectGunnar Sletta2011-08-221-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The texture provider needs to live completely in the rendering thread and needs to be selfcontained during rendering. During the items updatePaintNode() all needed state is copied into the texture provider. Texture providers have thread affinity in the rendering thread and are deleted there using deleteLater() and the added processEvents() in the rendering loop. This fixes the bug where a QSGItem is deleted as a result from an animation while the same item is being used as a texture provider in the rendering thread. There is also a small optimzation to QSGShaderEffectSource in that we don't create a paint node when the shader source is not going to be shown. Change-Id: I6b9bc1da2a0f55d3d5356d4091fd6af6a7ea6f01 Reviewed-on: http://codereview.qt.nokia.com/3293 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* | | | | Refactor SpriteEngine out of StochasticEngineAlan Alpert2011-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add ParticleGroups which use only StochasticStates Simplistic change for now, just to focus the API for the particle system. ParticleGroup elements replace the particleStates property on the system, and the term "group" is now used more consistently. Change-Id: I6456f9c521b8166ccd94ea953275557bcfbf6423 Reviewed-on: http://codereview.qt-project.org/4699 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* | | | | Reduce compile warningsAlan Alpert2011-09-131-0/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also change QSGDirection::sample to pass by value. Change-Id: I878649158b78da22afdf77b5f3ce3263ce1070cd Reviewed-on: http://codereview.qt-project.org/4497 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* | | | Particles module refactoring en masseAlan Alpert2011-09-081-45/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the little changes in one commit. StochasticDirection -> Direction AngledDirection -> AngleDirection TargetedDirection -> TargetDirection QSGCustomParticle is now Affector's implementation (C++ only refactor) FollowEmitter -> TrailEmitter Kill -> Age and gained lifeLeft property ModelParticle is removed, use ItemParticle instead. Added RectangleShape to replace Shape for the case of Rectangles Abstract Types are no longer createable, despite sensible defaults. GLSL variables in CustomParticle now begin with qt_ JS variables are now such that x,vx,ax are current (old ones are now initialX, initialVX, initialAX). Same for y. A few more were extended. Emitter::emitCap -> Emitter::maximumEmitted. Set to -1 for noCap: false Emitter::noCap is gone. Emitter::emitting -> Emitter::enabled Affector::active -> Affector::enabled Affector::collisionParticles -> Affector::whenCollidingWith Affector::signal is gone. PointAttractor -> Attractor Attractor/Wander::physics -> ::affectedParameter ParticleSystem::fastForward is gone ParticleSystem::startTime is gone (use Emitter::startTime) ParticleSystem::clear -> ParticleSystem::empty And various Doc fixes. Change-Id: Ia3b02b987f692e6f1bd14c42e575381bdfb7bbb5 Reviewed-on: http://codereview.qt-project.org/4231 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* | | | Animation-like API for ParticleSystemAlan Alpert2011-09-071-6/+7
| |_|/ |/| | | | | | | | | | | | | | | | | | | | Includes skipping rendering when paused. Change-Id: I353ac415fb877917d46ba1832ad9cb5a84640b57 Reviewed-on: http://codereview.qt.nokia.com/4041 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* | | Custom Particle now supplies default codeAlan Alpert2011-08-311-20/+48
| |/ |/| | | | | | | | | | | | | | | | | | | Attributes and a sample function are now prepended to the vertex shader, allowing many to become simple again. Change-Id: Ie1fbc864bd0d58647cb67994b96c2cb88db92f10 Reviewed-on: http://codereview.qt.nokia.com/3839 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Glenn Watson <glenn.watson@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* | Lift particle limits on desktopAlan Alpert2011-08-241-1/+3
| | | | | | | | | | | | | | 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>
* | Remove \since tagsAlan Alpert2011-08-151-1/+0
|/ | | | | | | | | It's a new module, of course they're new in this version. Change-Id: I8bce4d452161cd581c046fec62a41cac4e0609ed Reviewed-on: http://codereview.qt.nokia.com/2854 Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Renamed ShaderEffectItem to ShaderEffect and some API changes.Kim Motoyoshi Kalland2011-07-281-11/+15
| | | | | | | | | | | | | | | | The ShaderEffectItem was renamed to ShaderEffect to be consistent with other QML element names. The GLSL uniform variable qt_ModelViewProjectionMatrix was renamed to qt_Matrix which is easier to type and remember. The GridMesh element was removed. The mesh resolution is now specified simply with a QSize. To make the transition easier, the old API will continue to work for some time, but will output warnings if used. Eventually, I will remove the old API completely. Change-Id: Iec4f2aa624a2c76a7db6750c58f73dbcb316ab6a Reviewed-on: http://codereview.qt.nokia.com/2270 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Add some more properties to JS particle typeAlan Alpert2011-07-281-4/+4
| | | | | | | | | | | Adds the current position, velocity and acceleration. While we're at it, renaming the velocity vars from sx,sy to vx,vy Change-Id: I87f582169c7873c45a6fd453052b25c4dc940f3e Reviewed-on: http://codereview.qt.nokia.com/2021 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Initial stab at docs for QtQuick.Particles 2.0Alan Alpert2011-07-201-2/+11
| | | | | | | Change-Id: I3c53f7998dff95616a994edf19094fa4007d74ab Reviewed-on: http://codereview.qt.nokia.com/1388 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Update licenseheader text in source files for qtdeclarative Qt moduleJyri Tahtela2011-07-081-17/+17
| | | | | | | | Replace old license header with correct one. Change-Id: I492ddaaa0227b2c8faf11bdcd6e12e7231a54a10 Reviewed-on: http://codereview.qt.nokia.com/1312 Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
* Squashed Particle System Stateful RewriteAlan Alpert2011-07-061-82/+101
| | | | | | | | | | | | | | | | | | | | Add TargetAffector Fix for ParticlePainter offsets Adds a particleStates property to ParticleSystem Augment SpriteGoal to change system states as well Also add 'collidingParticles' list to affector. Particle Stochastic States Now actually working, and you can put emitters, affectors and painters inside their targeted state. Fireworks example uses states instead of delegates. Replaced the delegate example with a text thing. The examples launcher now also contains all the custom examples. Adds CumulativeDirection and working null Affector (for affected signal). Add spaces after all flow control keywords. Change-Id: I77b7e3044a9800dbfff6db833914d63127602cf5 Reviewed-on: http://codereview.qt.nokia.com/968 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Updated tst_nodestest to use the DirtyForceUpdate flag.Kim Motoyoshi Kalland2011-06-231-2/+0
| | | | | | Changed test to use DirtyForceUpdate instead of DirtyAll, and removed DirtyRenderOrder and DirtyAll enums which should not be used.
* Rewrite last rewriteAlan Alpert2011-06-211-89/+29
| | | | | Also rewrite to have all particle state shared, not just common elements.
* Rewrite particle system to cope with changing particle countsAlan Alpert2011-06-151-72/+71
| | | | | | | And might do it again... Caught up in this massive change were the following smaller ones: -Some custom particle examples -delegate property on ItemParticle and an example with it
* Immense Particles Refactor Part AAlan Alpert2011-06-071-0/+581
Qt.labs.particles 2.0 moved to QtQuick.Particles 2.0. All C++ classes changed names, some renaming of QML types. Also adds CustomParticle.