aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles
Commit message (Collapse)AuthorAgeFilesLines
* Fix some typos in documentation.Jeff Tranter2014-01-092-2/+2
| | | | | | | | | Fix some spelling and grammatical errors in comments that show up in Qt documentation. No changes to code. Change-Id: I2d91518900c9b60ee8e8a8f549c88a1d50632b3d Reviewed-by: Nico Vertriest <nico.vertriest@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-12-301-1/+1
| | | | | Change-Id: I4c4577edde96978a986606bf30fbb925f871bd42 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* use private linkage where possibleOswald Buddenhagen2013-12-191-1/+1
| | | | | Change-Id: I1f51b7d043f49f2f2849eb370ac71366cbaa6da5 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* remove obsolete workarounds for qmake processing order problemsOswald Buddenhagen2013-12-191-17/+0
| | | | | Change-Id: I4b58eee6243c92f67bdd9c8f9da36ef82a489c12 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Move the vtable pointer from the object to the internal classLars Knoll2013-12-041-1/+1
| | | | | | | | This saves one pointer per object, and willmake other optimizations easier in the future. Change-Id: I1324cad31998896b5dc76af3c8a7ee9d86283bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't store the QSGNode pointerAlan Alpert2013-11-222-24/+24
| | | | | | | | | | | | | The QSGNode subtree may be cleared at any time. Get the subtree via the node pointer passed in updatePaintNode, to ensure that the subtree is still valid each update. Some references are still being stored but invalidated when a new subtree is created. QTBUG-34994 has been created to track fixing that. Task-number: QTBUG-33553 Change-Id: I2115aff931d42b613d207553c636be7d80c405bb Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove version definition from custom particle shaders for OpenGL ES.Maciej Kujalowicz2013-11-151-0/+6
| | | | | | | | | | Since OpenGL ES 2.0 does not support GLSL 1.2, #version 120 must be removed from embedded shaders for a custom particle. Task-number: QTBUG-34854 Change-Id: I8d3e51ff87acc099a53c4e312cd33d02e6a1cb4e Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Adapt Qt Quick 2 renderer to work with OpenGL Core ProfileSean Harmer2013-11-1312-26/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The basic approach is to have the batched renderer create and bind a vertex array object if it detects we are using an OpenGL Core profile context. The VAO is bound for the duration of the QQ2 renderer's work cycle and unbound at the end so as to not interfere with any other VAO's a user may wish to use. All shaders have been copied and ported to be compliant with the GLSL 150 core specification which is the minimum for a Core profile context (OpenGL 3.2 Core). We are not using any newer features as yet so this will work anywhere we can get a Core profile context. The QSGShaderSourceBuilder class has been extended to resolve any requests for shaders to the same basefilename with "_core" appended prior to any file extension. This could be extended in the future to allow version, or GPU or platform specific shaders. The QSGShaderSourceBuilder has also been extended to allow it to insert #define definitions in the prologue of a shader. Any such definition is inserted: * After the last #extension directive (if any are found) * Otherwise after the #version directive (if found) * Otherwise at the start of the shader source This is required by the custom particle shaders which make extensive use of such #defines. In addition the mechanism used by the distance field glyph cache to extend the cache with new glyphs has been modified to work (and work more efficiently) when using a Core profile context. Rather than using a shader program and a buffer filling quad to blit the old texture into the new cache texture, we instead use the technique of framebuffer blitting. The existing fallback implementation using glTexSubImage2D() is still available if needed. The DECLARATIVE_EXAMPLE_MAIN macro has been extended to allow easy testing of any of the QtDeclarative examples with a core profile context. Just run the example with QT_QUICK_CORE_PROFILE=1 ./text for e.g. The only ones that may not work out of the box are those that provide GLSL shader source e.g. the customparticles or shader effect examples. These work fine if the shader source is adapted to GLSL 150 core. In the future it may be a good idea to expose some context property to QML that the user can use to determine what shader source variation to provide to Qt Quick. Along these lines it would also be very nice to allow the provision of shader source to ShaderEffect or CustomParticle from a separate source file just as we now do within Qt Quick. Task-number: QTBUG-32050 Change-Id: Ia6e9f06dbb8508af9ae03c6b60fb418b4cc9e41f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Simplify & speed up function callingLars Knoll2013-11-091-11/+11
| | | | | | | | | Get rid of the SimpleCallContext, instead simply use the CallContext data structure, but don't initialize the unused variables. Change-Id: I11b311986da180c62c815b516a2c55844156d0ab Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add missing Q_INIT_RESOURCETor Arne Vestbø2013-11-051-0/+7
| | | | | | | | | | The library needs to do Q_INIT_RESOURCE for all resources it uses internally, otherwise static linking will fail, and the user has no idea how to rectify it as the name of the missing resource is not known. Change-Id: I8ea766e63cff22bbb0c45e6125c3a07948de2274 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-11-051-1/+1
| | | | | | Change-Id: Ie7408409ddbaa354370267f2dd74326ec56a4186 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Refactor shaders into seprate GLSL source filesSean Harmer2013-10-319-244/+308
| | | | | | | | | | | | | | | | | | | | | | The default implementation of QSGShaderMaterial::vertexShader() and fragmentShader() now loads the GLSL source from a list of source files that can be specified via the setShaderSourceFile() or setShaderSourceFiles() functions. Multiple shader source files for each shader stage are supported. Each source file will be read in the order specified and concatenated together before being compiled. The other places where Qt Quick 2 loads shader source code have been adapted to use the new QSGShaderSourceBuilder, which is also used internally by QSGMaterial. This puts Qt Quick 2 into a better state ready to support OpenGL core profile and to load different shaders based upon OpenGL version, profile, GPU vendor, platform, etc. Change-Id: I1a66213c2ce788413168eb48c7bc5317e61988a2 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Load image data on main threadAlan Alpert2013-10-302-25/+34
| | | | | | | | | QQuickPixmap use should be done on the main thread, if not it can lead to an exception when creating the file loading thread (owned by the engine). Change-Id: Id59cec4312ecdee537dcba85778bd90ea4433b2e Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Work around Nouveau driver bugsGunnar Sletta2013-10-301-0/+6
| | | | | Change-Id: I25311a2bd88f41087352e0a43ba505f4e27b7e85 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Make sure custom particles mark themselves dirty.Gunnar Sletta2013-10-291-1/+4
| | | | | | | Task-number: QTBUG-34396 Change-Id: I3a012166489cb36b923ff794bf9ac26c4bae0508 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid side effects when en exception has been thrown.Lars Knoll2013-10-291-3/+3
| | | | | | | | | | | | | | We don't want to check for exceptions after every single line on our runtime methods. A better way to handle this is to add the check in all methods that have direct side effects (as e.g. writing to a property of the JS stack). We also need to return whereever we throw an exception. To simplify the code, ExecutionContext::throwXxx methods now return a ReturnedValue (always undefined) for convenience. Change-Id: Ide6c804f819c731a3f14c6c43121d08029c9fb90 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't use reserved keyword "texture" as uniform variable nameSean Harmer2013-10-211-11/+11
| | | | | | | | | | The "texture" keyword is a function name in OpenGL core profile. This commit is in preparation for making the Qt Quick 2 renderer and materials work with a core profile context. Change-Id: Iad243e64ab8db739fc46b85bb626bdb8b9ceb208 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-0225-157/+157
| | | | | | | | | | All QML references of the form <QML-module-name><QML-module-version>::<QML-type>::<member-name> have had the <QML-module-version> removed i. Task-number: QTBUG-33776 Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix CallContext to not hold arguments on the C stack anymoreLars Knoll2013-09-281-15/+20
| | | | | Change-Id: I35f46cce4f243d4b8b2bac9244f8fc26836f413b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix API of QQmlV4HandleLars Knoll2013-09-264-10/+10
| | | | | Change-Id: Iac4a3fefebd33a5990408598486231a5add8e639 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix Persistent/WeakValue APILars Knoll2013-09-261-4/+6
| | | | | | | Don't use unprotected Values in the API anymore. Change-Id: I8851628227fca374de24701bc8ee0908b5ae3923 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert putIndexed()Lars Knoll2013-09-223-3/+6
| | | | | Change-Id: I7d02b0fdf45079d0f7afcfb6d3158dd60cb09f33 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup Object::define*Property APILars Knoll2013-09-221-4/+4
| | | | | Change-Id: I99125908a9bc1d41a2642c409af9704def7a0832 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Further work towards an exact GCLars Knoll2013-09-221-14/+24
| | | | | | | | | | | Add some more convenience in the helper classes in qscopedvalue_p.h Make accesses to CallData safer, and change ExecutionEngine::newObject() to return a safe pointer. Change-Id: I980909754ce9681cf6faa1355bab3a1e5d6dd186 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert more methods to return a Returned<>Lars Knoll2013-09-183-9/+12
| | | | | Change-Id: If294c9c4f574824c308b63a11da1337226180105 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert builtin methods to return a ReturnedValueLars Knoll2013-09-181-22/+22
| | | | | Change-Id: I6b75adbf53a5be0deab023d2eed98ce2a7915551 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow QtQuick private headers to be used with QT_NO_KEYWORDS.Jocelyn Turcotte2013-09-1226-130/+130
| | | | | | | | | | | This is necessary for the QtWebEngine module. This also adds an empty nokeywords test using the same mechanism as qtbase/tests/auto/tools/moc/no-keywords.h to find conflicts at compile time. Change-Id: I9df541720797dd61f078178c2af68ead18ff8bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Qquickimageparticle: Simplify codeTobias Hunger2013-09-121-2/+2
| | | | | | | Clang nags about perfLevel < 9999 being always true. Change-Id: I09f46a8cd81f0f7eecdbd5eabd52f8f7ff4603c1 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Move prototype pointer into QV4::InternalClassLars Knoll2013-09-021-1/+1
| | | | | | | | | | | | | The prototype is actually the same for most objects. By moving it into the internal class, we can save 8 bytes per object, as well as allowing for some future optimizations. Also fix a bug in the implementation of the Error prototype objects. Change-Id: I4d4b641055f644a9b088f27be34bfdb0446279b7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge branch 'wip/v4' of ssh://codereview.qt-project.org/qt/qtdeclarative ↵Simon Hausmann2013-08-0617-159/+178
|\ | | | | | | | | | | into dev Change-Id: I278524d0f43d2237201d9cf78c1c36a5ecc83d84
| * std:: fixes to make qtdeclarative closer to compilable with QNX NDK.Petr Nejedly2013-07-264-12/+12
| | | | | | | | | | | | | | Math functions come in std:: when #included through <cmath> Change-Id: I62550e5c23cb6f4464f2c2f5c4188a91b3512d1a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-06-248-13/+58
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/imports/qtquick2/plugins.qmltypes src/qml/debugger/qv8debugservice.cpp src/qml/qml/qml.pri src/qml/qml/qqmlcompiler.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlcontext.cpp src/qml/qml/qqmldata_p.h src/qml/qml/qqmlengine_p.h src/qml/qml/qqmljavascriptexpression.cpp src/qml/qml/qqmlxmlhttprequest.cpp src/qml/qml/v4/qv4bindings.cpp src/qml/qml/v4/qv4irbuilder.cpp src/qml/qml/v4/qv4jsonobject_p.h src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/qml/qml/v8/qv8bindings.cpp src/qml/qml/v8/qv8contextwrapper.cpp src/qml/qml/v8/qv8listwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper_p.h src/qml/qml/v8/qv8sequencewrapper_p_p.h src/qml/qml/v8/qv8typewrapper.cpp src/qml/qml/v8/qv8valuetypewrapper.cpp src/qml/types/qqmldelegatemodel.cpp src/quick/items/context2d/qquickcanvasitem.cpp src/quick/items/context2d/qquickcontext2d.cpp sync.profile tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/benchmarks/qml/animation/animation.pro tools/qmlprofiler/qmlprofiler.pro Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
| * | Convert v8::Array usage in particles to V4Simon Hausmann2013-06-123-12/+21
| | | | | | | | | | | | | | | Change-Id: Ib3c39903bf8f8507d68f94baea81b3bf642ce8f6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Port ParticleData to V4Simon Hausmann2013-06-125-103/+118
| | | | | | | | | | | | | | | Change-Id: Ifc48b73a2fbfda22d3c4419cb34dd5307107f688 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Don't include v8.h from qv8engine_p.h anymoreLars Knoll2013-06-101-0/+2
| | | | | | | | | | | | | | | Change-Id: Idb0f5744f65b28acbe878a3e9d33b4a3946ecab8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Get rid of v8::BooleanLars Knoll2013-05-211-1/+1
| | | | | | | | | | | | | | | Change-Id: I10b4240db78532dfdf972bb0a6f191462d81caaa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Get rid of v8::NumberLars Knoll2013-05-211-3/+3
| | | | | | | | | | | | | | | Change-Id: I38bdf8fe4dd73c61317912ec6308a9a1e870ad99 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Remove v8 dependencies from QQmlV4HandleLars Knoll2013-05-086-12/+12
| | | | | | | | | | | | | | | Change-Id: I87d2183738ec7cfeea846a28f2b9aed79a233f68 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Remove v8::persistent usage from particlesLars Knoll2013-05-083-11/+12
| | | | | | | | | | | | | | | Change-Id: I69cd4ccf51c40e2ee63f024a7ccc2d8b35b14ae4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | More steps towards eliminating the v8 layerSimon Hausmann2013-05-071-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | * Changed the return type of the InvocationCallback from a v8 handle to a QV4::Value * Removed v4 auto tests and fixed build of other tests Change-Id: Ic927b925923ca8785170689a5c260969fd1cb794 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Replace v8::Undefined() with QV4::Value::undefinedValue()Simon Hausmann2013-05-071-1/+1
| | | | | | | | | | | | | | | Change-Id: I4c7bb5bcc1bc15a982bb83d2597e6ae4bc5710cd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Get rid of v8::LocalLars Knoll2013-05-061-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | The class was doing exactly the same thing as v8::Handle in our implementation. Removing it cleans up quite a bit of code. Change-Id: I37a3dcdef062fc388751e9ef0a158b5926ba2efb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Remove v8::HandleScopeLars Knoll2013-05-034-6/+0
| | | | | | | | | | | | | | | | | | | | | This class never made sense with v4... :) Change-Id: Id597d791d1adf52cc821d6d46f57cb24d1acd343 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Cleanup v8 Context handlingLars Knoll2013-05-034-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need or use v8 Context objects, so it's sufficient to have one global context for now. Remove all code related to entering or leaving Context's. Change-Id: I4f7ddaa4907e59de5713368fa13bbc40e5830542 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | More build fixes.Erik Verbruggen2013-04-192-0/+3
| | | | | | | | | | | | | | | Change-Id: I5421af856e68d8eb0f32ed12cf210b367b5279f9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Rename QQmlV8Handle to QQmlV4HandleLars Knoll2013-04-1910-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | The handle wraps a V4 Value, so this is the better name for it. Also added some accessor methods to convert to and from V4 Values. Change-Id: I327c83feb5bd3be59909001489979e5a3a9d9e67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Fix compilation with built-in v4vm JS engineSimon Hausmann2013-04-151-1/+0
| | | | | | | | | | | | | | | Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | avoid redundant calls to glActiveTextureGunnar Sletta2013-08-021-4/+1
| | | | | | | | | | | | | | | Change-Id: I00b5c82d76473a10f64f5a3aa0cd19ef88319ed6 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | | Remove redundant calls...Gunnar Sletta2013-08-021-5/+0
| |/ |/| | | | | | | | | | | | | | | Geometry ownership only matters when the node is or the entire geometry object is replaced. Accessing the bits in it can be done without any issues. Change-Id: I6da636bc5cdbda03039e00922e599932f4117d1a Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-282-3/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/doc/src/appdevguide/porting.qdoc sync.profile Change-Id: Iec5516c596c3eca60a3e6ceb1d45f2a7a1595c12