summaryrefslogtreecommitdiffstats
path: root/src/quick3d/quick3dscene2d
Commit message (Collapse)AuthorAgeFilesLines
* ResourceAccessor: allow read-only access to texturesLaszlo Agocs2018-08-101-1/+1
| | | | | Change-Id: I0a8d20081912f3ff9a037cab74702581b3b02613 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Doc: Use correct module namePaul Wicking2018-07-301-1/+2
| | | | | | | | | QML: Importing Qt3D.Scene2D doesn't work, QtQuick.Scene2D does. CPP: Specify header file, as convenience header doesn't exist. Task-number: QTBUG-67370 Change-Id: Ia53e92c076f52bbb81b91370425279c44bf9e3c5 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix deadlock in scene2dMäättä Antti2018-06-262-1/+25
| | | | | | | | | Use the SurfaceLocker only when using ANGLE. Don't lock the texture when using ANGLE. Task-number: QTBUG-69039 Change-Id: Ib95fcf05febe1ec9c3ddc225932b5e8d15dc6937 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Change scene2d to always clear the windowMäättä Antti2018-05-081-1/+2
| | | | | | | | | | Always clear the window. This enables transparency. Task-number: QT3DS-1497 Change-Id: I2186771ee81963f599048a74b8778fcfead4c75a Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Revert "Doc: Divide documentation into submodules"Topi Reinio2018-04-203-146/+0
| | | | | | | | | | | This reverts commit c8964b8f1cf56718a189b0f57bad446cec30a8b8. QDoc now supports documentation-specific custom module headers and include headers that allow us to keep using a single documentation project that covers multiple modules. Change-Id: I84706a7149097a6b03f0f266e55d6f712a6c773e Reviewed-by: Martin Smith <martin.smith@qt.io>
* Document state of the Qt 3D modulesKai Koehne2018-03-121-4/+6
| | | | | | | | | | | | | Do make it explicit which ones are still in development also in the landing page, and add \preliminary and \since tags (for released and TP modules, respectively). Note that the \preliminary, \since tags currently do not work for \qmlmodule, which hopefully gets fixed at one point: QTBUG-65963. Change-Id: I6648311c38f331286be37eefa60794984cd239b7 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Sean Harmer2018-02-151-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/animation/doc/src/qt3danimation-module.qdoc src/render/backend/abstractrenderer_p.h src/render/backend/buffervisitor_p.h src/render/backend/renderer.cpp src/render/backend/renderer_p.h src/render/backend/triangleboundingvolume_p.h src/render/backend/trianglesextractor_p.h src/render/frontend/sphere_p.h src/render/jobs/calcboundingvolumejob.cpp src/render/jobs/job_common_p.h src/render/jobs/pickboundingvolumejob.cpp src/render/jobs/pickboundingvolumejob_p.h src/render/jobs/pickboundingvolumeutils.cpp src/render/jobs/renderviewjobutils_p.h tests/auto/render/boundingsphere/tst_boundingsphere.cpp tests/auto/render/commons/testrenderer.h tests/auto/render/raycasting/tst_raycasting.cpp tests/auto/render/render.pro tests/auto/render/renderer/tst_renderer.cpp Change-Id: I76633bc5a5a065e5f9ea62cc16563377e5c693a3
| * Merge remote-tracking branch 'origin/5.9' into 5.10Sean Harmer2018-02-061-5/+8
| |\ | | | | | | | | | Change-Id: I72fdfb9a20be2f819542243e888756818b03c28e
| | * Fix crash in scene2d at shutdownMäättä Antti2018-02-061-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The resource manager policy for scene2d nodes has been changed so the scene2d constructor gets called multiple times at startup. That in turn increments render thread user counter every time. The cleanup code gets called for each instanciated QScene2D node so at shutdown the counter never reaches zero and the render thread is not closed properly. Change the implementation so that the counter gets incremented only when the render thread has been properly initialized. Task-number: QTBUG-66003 Change-Id: I33a5b1f407e65329776bcabe0b66ff049581a435 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Render: Use SIMD Vectors and Matrices in the backendPaul Lemire2018-02-021-4/+4
| | | | | | | | | | | | | | | Change-Id: I19b3b2f8fcb06eb2bc600ebe370465dd15a8eabc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10.1' into 5.11Liang Qi2018-02-141-5/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/backend/renderer.cpp src/render/backend/renderer_p.h tests/auto/render/renderer/tst_renderer.cpp Done-with: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Change-Id: I2ca9bac4777e51434579edf86030414734f533ac
| * | | Fix crash in scene2d at shutdownv5.10.1Määttä Antti2018-02-081-5/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The resource manager policy for scene2d nodes has been changed so the scene2d constructor gets called multiple times at startup. That in turn increments render thread user counter every time. The cleanup code gets called for each instanciated QScene2D node so at shutdown the counter never reaches zero and the render thread is not closed properly. Change the implementation so that the counter gets incremented only when the render thread has been properly initialized. Task-number: QTBUG-66003 Change-Id: I33a5b1f407e65329776bcabe0b66ff049581a435 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> (cherry picked from commit 564dfd87c5b1317dcf9fbc4d1c8d858c72513421) Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* | | Doc: Divide documentation into submodulesTopi Reinio2018-02-093-0/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDoc in Qt 5.11 will use Clang (libclang) to parse C++ documentation. In order to do that, Clang needs to have the include paths available when parsing source; qmake provides that information to QDoc but only when the documentation project is located under the correct module (source) path. By having dedicated doc projects for Qt 3D Core, Render, Input, etc. the number of documentation warnings is signicantly reduced. A top-level 'Qt 3D' project is still kept, and contains the landing page, overview, examples, and top-level 'C++ classes' and 'QML types' pages that list all types documented across all Qt 3D submodules. Change-Id: Id5936de36f31c2a8764a64e1e9d7ae0d10e8ab14 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | Remove hardcoded C++ version for MinGW/GCCKai Koehne2018-01-111-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was apparently needed for older MinGW-w64 headers that did not properly define some common system functions otherwise. Anyhow, it is not required anymore for newer MinGW-w64, and actually breaks compilation with gcc 6 and newer: There we enable shift-overflow=2, which also warns about shifting into the sign bit for C++11, but not for C++14. Task-number: QTBUG-60249 Change-Id: I53bc858c6f8baf9b60940904b3b28f7a49ab28e6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-256-8/+8
|/ / | | | | | | | | Change-Id: I92c955068e233c50043ad7d06a32300dd386c24d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Re-enable the QQmlType code paths in the node factoriesSean Harmer2017-08-252-4/+2
| | | | | | | | | | Change-Id: Ieacfbfb25de4840d7c428f89cd1f7d178852036e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge branch '5.9' into devSean Harmer2017-08-192-1/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/backend/renderer.cpp src/render/backend/renderview.cpp src/render/graphicshelpers/graphicscontext_p.h src/render/graphicshelpers/graphicshelperes2_p.h src/render/graphicshelpers/graphicshelpergl2_p.h src/render/graphicshelpers/graphicshelpergl3_2_p.h src/render/graphicshelpers/graphicshelpergl3_3_p.h src/render/graphicshelpers/graphicshelpergl4_p.h src/render/graphicshelpers/graphicshelperinterface_p.h src/render/jobs/pickboundingvolumejob.cpp tests/auto/animation/clipanimator/tst_clipanimator.cpp tests/auto/auto.pro tests/manual/manual.pro Also disabled the QQmlMetaType codepaths following commit 49a11e882059ee1729f776722e085dd21d378c36 in qtdeclarative. The QQmlMetaType codepaths will be re-enabled once a qt5.git integration has succeeded. Change-Id: Ia654d75425e6d406c472d19864383612208cad2b
| * Fix Quick3DNode factories following QQmlType changesPaul Lemire2017-08-162-5/+3
| | | | | | | | | | Change-Id: I333485024f4c5534d8f2bf6ee301ba52638e6126 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Disable QQmlType codepathsPaul Lemire2017-08-031-0/+2
| | | | | | | | | | | | | | Will allow to update the qt5.git configuration without breaking the CI Change-Id: I16d7e2af9da935d4d31f5909575c8edec4a9432e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge branch '5.9' into devSean Harmer2017-06-191-7/+0
|\| | | | | | | | | | | | | | | | | Conflicts: src/render/frontend/qcameralens_p.h src/render/texture/qtexture.cpp src/render/texture/qtexture_p.h Change-Id: I20b25cf123f44c96f69ca5f8e042a38692e5cb49
| * Fix context sharing in scene2dMäättä Antti2017-05-271-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The scene2d context sharing fails if the share context is in use when scene2d tries to create it's context. This happens when the scene2d is initialized while Qt 3D is already using it's own context. In Scene3D case we always create another context to prevent this. Change the Qt 3D to create it's own share context only when it's context shareContext is not set. Also change the format in scene2d to always get it from the share context so that it matches with it and the sharing works with all platforms. Task-number: QTBUG-60974 Change-Id: I11df0b647207dbcc1d285ae4687c1e37010443f2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Refactor job to prepare for line and point pickingMike Krus2017-05-261-0/+2
|/ | | | | | | | | | | | | This moves much of the job utils into private code, simplifies the various class types, clarifies names to avoid clashes and simplifies some APIs. Introduces changes in headers requiring extra includes in various files. Task-number: QTBUG-58071 Change-Id: I20a8251abcef140d9d71b372a66282e242a21ad2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Improve QScene2D documentationsMäättä Antti2017-05-091-6/+91
| | | | | | | | Add missing docs and add usage instructions for the Qml type. Change-Id: Id52025f0022bbaad56b0dbf4aa8ed33575568ceb Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Scene2D cleanup - register pick events when scene is initializedAntti Määttä2017-05-097-102/+99
| | | | | | | | | | | | | | | The current model where mouseGrab is connected to picker signal doesn't work. The pressed event is not sent to scene2d item, because it is already lost when scene2d gets the grabMouse message where it registers to the picker events. This breaks the mouse event sequence (press-move-release) for the quick item. Instead hook to setScene of the node to message scene2d when the scene gets initialized and always register to the picker events. Task-number: QTBUG-58876 Change-Id: Ic9ca4b0899a030336ef20ff2cffbe10b567c36f5 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Scene2D cleanup - remove qml engine and sourceMäättä Antti2017-05-094-205/+9
| | | | | | | | | | Remove QQmlEngine constructor and source property. Update unit tests and manual tests accordingly. Task-number: QTBUG-58876 Change-Id: Ide06bb1381f48efa5378f9a008476734a33089c1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Scene2D: put picking coordinates back in window coordinatesKevin Ottens2017-05-051-1/+1
| | | | | | | | | We get the picking coordinates in model local tex coords which have a different convention than the mouse events in window coordinates. So flip them vertically to pass them in the right convention. Change-Id: I558cc62c7c820677407730eead8011193a4b967c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add qAsConst, range-loop might detach Qt container (clazy reports)Mike Krus2017-05-021-2/+2
| | | | | Change-Id: I5d541cd0d08f17c25cbb839c111417130d133c3c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add skeleton documentation for scene2d moduleMäättä Antti2017-04-121-4/+4
| | | | | | | | | Add a skeleton documentation. The scene2d docs still need updating with proper usage instruction and docs for the final IF. Task-number: QTBUG-60099 Change-Id: I0a0f329d22b4f694bc663e635533f298da7e0605 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix warning about cast from ASCIIThiago Macieira2017-04-081-1/+1
| | | | | | | qt3dquickscene2dnodefactory.cpp:55:64: warning: ‘QString::QString(const char*)’ is deprecated [-Wdeprecated-declarations] Change-Id: I37cc967e689f4523b504fffd14adf00e7d8ef4bf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Don't explicitly disable the Qt3D category loggingLaszlo Agocs2017-03-311-1/+1
| | | | | | | | | | | | | Category logging is off by default, so explicitly turning it off will just make it harder to turn it on in the application. qt.*.debug has special behavior in the sense that defaults to off. Other categories, like Qt3D.*.debug default to true. Therefore the only correct way in Qt 3D is to always specify warning-and-up as the default enabled severity. Change-Id: I91daf48e049b7a9fcfac9720982138b178ee4804 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Fix scene2d mouse event coordinate calculationAntti Määttä2017-03-231-3/+4
| | | | | | | | | Apply the window size and use correct texture coordinates. Task-number: QTBUG-57253 Change-Id: Ibc5f7ef878baf938b1b3e3b7cfb4eba2cea38ad6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix flaky autotest tst_scene2dAntti Määttä2017-03-231-4/+8
| | | | | | | | Add early bail out to initializeSharedObject when running autotest. Task-number: QTBUG-59345 Change-Id: I566c59e3f84e45a8d072b0bd5119a5127ee88bf8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Scene2D::sceneChangeEvent: handle grabMouseShawn Rutledge2017-03-211-1/+1
| | | | | | | | It must have been renamed at some point. Task-number: QTBUG-57253 Change-Id: Ie06a914b7c1ce5642d32294e340ef29055716470 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Fix clang warnings in Scene2DMike Krus2017-03-064-14/+12
| | | | | | | | | - out of order initialization - unused data member - switch case values not in enum Change-Id: I9640d0ee2cbc058fbb2e2e89e5bcb839163bf49c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix crash in scene2d when using angleAntti Määttä2017-03-061-0/+4
| | | | | | | | | | Angle can't do multithreaded rendering on shared context so it needs to synchronize the rendering with qt3d render thread. The SurfaceLocker uses static mutex, so using it to lock the surface will prevent simulatious rendering as well. Flag the surface lock for angle build only. Change-Id: I83d4e1f1d6a48e86196bc113cbab4ee79205b61f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* cleanup scene2d - change mouse event handlingAntti Määttä2017-03-0310-7/+415
| | | | | | Task-number: QTBUG-58876 Change-Id: I103125ff15a4b28a67832eb7b86b1abbd2f3fde8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Cleanup scene2d - remove duplicate ifndefAntti Määttä2017-02-281-4/+0
| | | | | | | Remove duplicate GL_DEPTH24_STENCIL8 ifndef. Change-Id: I882ad42d61146478290e6b0fc73691ec6d42b2a2 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Enumerize event idsAntti Määttä2017-02-287-41/+117
| | | | | | | | Add Scene2DEvent to holds the enums. Change-Id: Icd8febe7808acdbe639f9f5aaa5caba0548aa363 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Split scene2d implementation to multiple filesAntti Määttä2017-02-289-536/+793
| | | | | | Change-Id: I7926898be5409334ec46b59eec76678c613b0d87 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Move scene2d to own module and implement conditional plugin loadingAntti Määttä2017-02-2815-0/+2077
- Add quick3dscene2d module - Add importsscene2d qml module - Modify RenderAspect to load plugins conditionally - change autotests to match the module change Change-Id: If6596472acbd9a377561b2bfd2094a0585c781ac Reviewed-by: Antti Määttä <antti.maatta@qt.io>