summaryrefslogtreecommitdiffstats
path: root/src/core/aspects
Commit message (Collapse)AuthorAgeFilesLines
* Switch export macros to standard formKai Koehne2019-04-027-11/+11
| | | | | | | | | | | | Qt expects the export macros to have Q_ prefixes, otherwise the symbol versioning script won't find them and mark them. Also remove non-exising QT3DLOGIC_PRIVATE_EXPORT macro from src/doc/qt3d.qdocconf Task-number: QTBUG-74752 Change-Id: I71b9e85ff09c002fb283824aa51a5a8f50e937f4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Add QT3D_REGISTER_ASPECT macro documentationPaul Wicking2018-11-062-2/+22
| | | | | | | | Also remove two '*' that ended up in the generated docs. Task-number: QTBUG-65413 Change-Id: Ia0870405f73166dbb73ee09e34e7625c51486b41 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Avoid busy loop in QAspectManager while simulation loop is not startedMauro Persano2018-07-041-35/+36
| | | | | | | | | | | | | After QAspectThread starts, it gets in a busy loop until QAspectManager::enterSimulationLoop is called. Make the aspect thread's main loop block on QEventLoop::processEvents until it's told to start the simulation loop. Task-number: QTBUG-67823 Change-Id: I3daac20b65227787c42907d53c11609e1a87ea85 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: Fix documentation warnings related to Clang QDoc parserTopi Reinio2018-04-201-1/+5
| | | | | | | | | | | | | | | | | | | | | Since Qt 5.11, QDoc uses Clang to parse C++ documentation. Clang requires a module header, as well as proper include paths, to build a precompiled header and process the sources. To do this, add a custom module header that pulls in all Qt 3D modules - this way, we can continue using a single documentation project to covers all of Qt 3D. Fix all documentation warnings are caused by missing namespaces, QML module/type names and typos, as well as a number of linking problems and other minor issues. After this change, the remaining documentation issues consist of 'No documentation for ...' warnings. Task-number: QTBUG-67790 Change-Id: I38b91163c475a00cc1893e793240470c5409eb57 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Fix documentation warnings for Qt 3D CoreTopi Reinio2018-02-163-8/+4
| | | | | | | | | | | | This change fixes multiple QDoc warnings for Qt 3D Core that are related to how Clang parses the source code and the \fn QDoc commands. We still have a number of 'No documentation for ...' warnings left - those are not addressed in this change. Change-Id: Ia6394f453d7bd959bc4d4cc9347ac0039b80f661 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Merge branch '5.10' into devSean Harmer2018-01-172-1/+3
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I248aa369ba98659a61e563fd29cc811c76ea1e2d
| * Prevent potential containers detachingMike Krus2018-01-141-1/+2
| | | | | | | | | | | | | | Found by Clazy clazy-range-loop Change-Id: I4956f9be2b7b3f986b2fc83c1d883829314a8b6c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Methods mistakenly marked as slotsMike Krus2018-01-131-0/+1
| | | | | | | | | | | | | | Found with Clazy clazy-const-signal-or-slot Change-Id: Ib3d2dc7c2b02f6dd7cac54a57b4397de2bea6b7f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-252-5/+5
|/ | | | | Change-Id: I92c955068e233c50043ad7d06a32300dd386c24d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Properly use QT_CONFIG for Qt3D profiling optionsPaul Lemire2017-08-033-12/+12
| | | | | | Change-Id: Id3bb7bb657f3d48c6c4cd3d5e86c43ad64dca791 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix config for importing buildsMike Krus2017-08-021-1/+1
| | | | | | | | Importing builds (in Creator) was broken because OUT_PWD is not known at that time, reported as QTCREATORBUG-18663 Change-Id: Iccc0876b6568aeaabb003ea3177f9a095be1442a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Initialize QBackendNodes after setting arbiterJan Marker2017-07-181-2/+3
| | | | | Change-Id: Ib329915e7962b0e60b0cbb66e5801f4a96fdf23a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge branch '5.9' into devSean Harmer2017-06-191-3/+3
|\ | | | | | | | | | | | | | | | | Conflicts: src/render/frontend/qcameralens_p.h src/render/texture/qtexture.cpp src/render/texture/qtexture_p.h Change-Id: I20b25cf123f44c96f69ca5f8e042a38692e5cb49
| * Normalize Q_ARG to avoid temporary memory allocationsSergio Martins2017-06-031-3/+3
| | | | | | | | | | | | | | Found by -Wclazy-connect-not-normalized Change-Id: I774424bb53c0d24bd49d5fafdfb8f02e9f05ee16 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Add support for single shot jobsMike Krus2017-05-223-1/+23
|/ | | | | | | | QAbstractAspect includes a list of jobs that will only be run once. The list is added in jobsToExecute and then cleared. Change-Id: I5849c643a06d8e4e81bbc55d610851de05087934 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Scene2D cleanup - register pick events when scene is initializedAntti Määttä2017-05-091-1/+1
| | | | | | | | | | | | | | | 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>
* Qt3D: add configure option for jobs and GL profilingPaul Lemire2017-04-055-12/+16
| | | | | Change-Id: Idb1f54d231e469670b24b2b2aecedbfc1cd0f956 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge branch '5.8' into 5.9Sean Harmer2017-04-0213-71/+75
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/jobs/qthreadpooler.cpp src/core/nodes/qcomponent.cpp src/core/qpostman.cpp src/core/qscene_p.h src/core/services/qservicelocator_p.h src/input/frontend/qinputaspect.cpp src/plugins/sceneparsers/assimp/assimpimporter.cpp src/plugins/sceneparsers/assimp/assimpimporter.h src/plugins/sceneparsers/gltf/gltfimporter.h src/plugins/sceneparsers/gltf/gltfio.cpp src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp src/quick3d/imports/extras/qt3dquick3dextrasplugin.cpp src/quick3d/imports/render/qt3dquick3drenderplugin.cpp src/quick3d/quick3dextras/qt3dquickwindow.cpp Change-Id: I3566708c6f74a34959e7bb64b64e93647ca3f699
| * Fixes includes to comply with coding conventions for Src/CoreRobert Brock2017-03-3113-71/+75
| | | | | | | | | | | | | | | | Reordering the header includes to comply with Qt coding conventions Task-number: QTBUG-56185 Change-Id: I3943678c183c4ef46d403e0fff878c3cad964dfa Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Don't explicitly disable the Qt3D category loggingLaszlo Agocs2017-03-311-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QDistanceFieldGlyphCache cleanupPaul Lemire2017-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | -made QDistanceFieldGlyphCache and QTextureAtlas private -remove dptr on QDistanceFieldGlyphCache -use a static hash on glyphCaches based on current scene being used -QTextureAtlas parented by scene root node Task-number: QTBUG-58881 Change-Id: If51d7dfe75e4233b9e7a36473c71fe530247aef7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge branch 'wip/qtquickintegration' into devSean Harmer2017-01-292-0/+15
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick3d/imports/render/qt3dquick3drenderplugin.cpp src/render/backend/triangleboundingvolume.cpp src/render/backend/triangleboundingvolume_p.h src/render/frontend/qrenderaspect.cpp src/render/frontend/sphere.cpp src/render/frontend/sphere_p.h src/render/jobs/pickboundingvolumejob.cpp src/render/jobs/pickboundingvolumejob_p.h src/render/picking/objectpicker.cpp src/render/raycasting/qcollisionqueryresult_p.h src/render/render.pro src/src.pro tests/auto/render/objectpicker/tst_objectpicker.cpp tests/auto/render/render.pro Change-Id: I95717c7855887850d5c90e7ad8f19f1ffb37a545
| * Load render pluginsAntti Määttä2017-01-272-0/+15
| | | | | | | | | | | | Change-Id: I035a4d1fa41988514551425917d6fd735a790b05 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Fix race in QAspectManager when shutting downPaul Lemire2017-01-102-1/+19
|/ | | | | | | | | | Happened when trying to shutdown immediately after creation by not giving a chance to properly complete initialization. Added a semaphore to force initialization to be completed prior to doing anything else. Task-number: QTBUG-56573 Change-Id: Ia1ecbf0bb8e156e6dc0e8667ee031baf31e0ecc6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAspectManager: add stat trace for arbiter sync timePaul Lemire2016-12-151-0/+14
| | | | | Change-Id: Ie2abab5d1116b57a0296ac52cc8a311e31ce2ef7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Specify #include path for each \classTopi Reinio2016-12-072-0/+2
| | | | | | | | | | | | QDoc tries to guess the correct #include statement, displayed in the requisites table in the class reference. However, this often produces incorrect information for a module as complex as Qt3D. To fix this, manually specify the include path with the \inheaderfile command. Change-Id: I42929b92600d07d759f4f76e9051ff656785c652 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAspectFactory_addDefaultFactory: keep QString based functionPaul Lemire2016-11-142-0/+10
| | | | | | | Prevents introducing a binary incompatible change Change-Id: Id2531a2582f1cd96ff26c929fdf526842a1ce5b5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAspectEngine: document the Qt3D run loopPaul Lemire2016-08-091-1/+38
| | | | | Change-Id: I3333fda49317aa44c729aaf2b8e0899f3e9e605c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* CommandExecuter: add lots of helpers to convert types to JSONPaul Lemire2016-07-051-2/+4
| | | | | Change-Id: Idaeacd1235a09f238527936098bbfff1fa904296 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* AspectCommandDebug: insert data as JSON objectPaul Lemire2016-07-051-1/+1
| | | | | Change-Id: Ie04a7b4017fe8f3e9839cf3faebfddc51d3d1a7b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make the Qt3D Renderer execute its first shell commandPaul Lemire2016-07-052-6/+9
| | | | | Change-Id: Iaf999f2091430223d12da323f8cb937d7fdefa7b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* AspectCommandDebugger: small refactoring + unit testsPaul Lemire2016-07-052-22/+37
| | | | | Change-Id: I0a6fd4dfc5a1274ec842513f1e43931c442c5eb5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QAspectEngine: use the AspectCommandDebuggerPaul Lemire2016-07-052-0/+18
| | | | | Change-Id: I950fb774f66667eb5883ac59d6e7ee39250511fc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add AspectCommandDebuggerPaul Lemire2016-07-055-2/+365
| | | | | | | | | Will allow to send command and replies from remote applications to Qt3D. Also added the class AsynchronousCommandReply which will behave basically like QNetworkReply for internal commands; Change-Id: Ia130f96387fb200658eb46a05e581abe9ef78f63 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Unit tests for layer filtering jobPaul Lemire2016-07-021-1/+1
| | | | | Change-Id: I15f9d1105a08a72e03c89da7b2c61c0ab88ee880 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAspectFactory: use QLatin1String instead of QStringPaul Lemire2016-07-014-14/+14
| | | | | | | | Otherwise we may encounter crashes when an app only links a subset of the Qt3D sub modules when the plugins may be linking against other other modules. Change-Id: I9e5e9457d933266806def86f9f91cc26db99ecc1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Do not create OpenGL context until render aspect is registeredSean Harmer2016-07-012-1/+18
| | | | | | | | | | | | | | | | | | | | | | | This avoids a race where the renderer creates a context based on the default format when the render aspect is created. The alternative fix would have been to simply create the QRenderAspect after setting the default surface format. However, that would mean being careful to do that everywhere in the future too. This fixes it more neatly and completely by creating the renderer in the render aspect's onRegistered() function. Whilst in there, this also solves the previous asymmetry in the onRegistered() and onUnregistred() functions. We now also unregister backend types and re-register them in onRegistered. This is necessary because the mappers depend upon the renderer. Also added a todo to make the unregisterBackendType() functions public for 5.8. Task-number: QTBUG-54370 Task-number: QTBUG-53880 Change-Id: I09a774739df069d3210ed0efe6dd504d968b05f3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QT3D_REGISTER_ASPECT: prepend QAbstractAspect return type with Qt3DCorePaul Lemire2016-06-301-1/+1
| | | | | | | Fixes compile issues when writing your own aspect Change-Id: I7b1414da35dbef059b407a1016969416b3a6498b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc for core moduleColin Ogilvie2016-06-031-2/+1
| | | | | | Task-number: QTBUG-46037 Change-Id: I187794f67a61e3e626e7992b0cfe211811823466 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* initializeFromPeer last when creating backend nodeKevin Ottens2016-05-231-1/+3
| | | | | | | | | This fixes issue with the focus handling in KeyHandler since initializeFromPeer checks the enabled state to request focus or not. Change-Id: Ib33f6a7fcec3cb96c1a71b3e6ba0be5f8eb942ed Task-number: QTBUG-53358 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Allow the QtQuick + Scene3D case to shutdown cleanlySean Harmer2016-05-203-3/+23
| | | | | | | | | | | | | | | | | | | | | | | ...by having the Scene3D item exit the simulation loop before asking the renderer to shutdown. This is necessary because if we let the simulation loop keep running then the render aspect keeps creating and executing jobs as we pull the rug out form under it by shutting down the renderer. This exhibited quite regularly as a crash caused by a race in the Shader::cleanup() function which tried to access the GraphicsContext that was destroyed by the renderer shutdown. This approach sequences things very similarly to the pure Qt 3D shutdown method. The main difference is that we explicitly stop the simulation loop whereas in the pure Qt 3D case, that is done for us by the QAspectEngine::setRootEntity(null) call. This is still done in the QAspectEngine dtor but by that time, the simulation loop is already stopped. The exit simulation logic has been adapted to handle this case. Task-number: QTBUG-51035 Task-number: QTBUG-42353 Change-Id: I08d16e301eab421fa6eb99e558f38e832534c151 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Allow the backend chance to process any final changes during shutdownSean Harmer2016-05-204-4/+27
| | | | | | | | | | | | | | | | | | | | | The QAspectEngine now flushes any pending changes batched up before telling the aspect manager to exit the simulation loop. Furthermore, the call to QAspectManager::exitSimulationLoop() now waits until the aspect thread has completely finished the simulation loop and has called onEngineShutdown() on each of the aspects. This is important to ensure that the main thread doesn't call QAspectEngine::shutdown() too early as this deletes the change queue which contains the final changes sent from the main thread during shutdown. For some reason the backend is unable to find which QBackendNodeMapper corresponds to each destruction change. Will investigate that next. Task-number: QTBUG-42353 Change-Id: Iec4d6a57a163effefd5b60249bf97c76ed187413 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Unregister aspects when shutting downSean Harmer2016-05-183-1/+34
| | | | | | | | | | | | | This allows the aspect manager to call QAbstractAspect::onUnregistered() in a symmetric way to onRegistered() before we exit the aspect manager's main loop. In particular, this allows the render aspect a chance to cleanly shutdown the renderer submission thread. Task-number: QTBUG-51035 Change-Id: I38a2f3d4fa016f451e53f0ceac02c387911aa6c4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix deadlock when quitting aspect managerJanne Koskinen2016-05-181-0/+4
| | | | | | | | Stop waiting for next frame advance if we are about to shut down. Change-Id: I334c5afa69eb262d6e4e7139acc826fbd7aa9263 Task-number: QTBUG-50044 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add more explicitMarc Mutz2016-05-141-1/+1
| | | | | | Change-Id: Iaa91d6248cbc3822ed3380e360d2880d4894446d Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use some constructor delegationMarc Mutz2016-05-141-3/+2
| | | | | | | | | | | | | to avoid code duplication (in both: executable and source code senses). Text size savings on optimized GCC 6.0 Linux AMD64 builds: Core: 16 Logic: 192 Input: -304 Render: 408 Change-Id: I23dd01fd4efe226c22942c24b21bbe20027c90b1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Qt3DCore: eradicate remaining Q_FOREACH loopMarc Mutz2016-05-141-1/+1
| | | | | Change-Id: I96364eb258f8f2f73456ddec4e9e65511b50c18e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNodePropertyChange -> QPropertyUpdatedChangeSean Harmer2016-05-101-1/+1
| | | | | | Task-number: QTBUG-51494 Change-Id: Ic326499f80b5a91b2d19c09770de926f220cc805 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Q_NULLPTR -> nullptrSean Harmer2016-05-017-18/+18
| | | | | | Task-number: QTBUG-52736 Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QAbstractAspect: remove all traces of cloningPaul Lemire2016-05-012-65/+7
| | | | | Change-Id: I9ff89f440d91740a9d9e163707d87ad13022e51b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>