summaryrefslogtreecommitdiffstats
path: root/src/core/aspects/qabstractaspect.h
Commit message (Collapse)AuthorAgeFilesLines
* Add support for single shot jobsMike Krus2017-05-221-0/+2
| | | | | | | | 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>
* Merge branch '5.8' into 5.9Sean Harmer2017-04-021-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-311-2/+2
| | | | | | | | | | | | | | | | 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>
* | Load render pluginsAntti Määttä2017-01-271-0/+9
|/ | | | | | Change-Id: I035a4d1fa41988514551425917d6fd735a790b05 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAspectFactory_addDefaultFactory: keep QString based functionPaul Lemire2016-11-141-0/+1
| | | | | | | Prevents introducing a binary incompatible change Change-Id: Id2531a2582f1cd96ff26c929fdf526842a1ce5b5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAspectFactory: use QLatin1String instead of QStringPaul Lemire2016-07-011-2/+2
| | | | | | | | 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>
* 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>
* 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>
* Q_NULLPTR -> nullptrSean Harmer2016-05-011-2/+2
| | | | | | Task-number: QTBUG-52736 Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* De-inline some polymorphic dtorsMarc Mutz2016-04-281-0/+1
| | | | | | | | | Helps avoid duplicated vtables and code (an out-of-line copy always needs to exist for the vtable to point at). Change-Id: I882552532cdba28a136542f3497f571d1593bac3 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge branch '5.6' into 5.7Sean Harmer2016-04-161-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qt3d/examples-common/qorbitcontrol.h src/core/qnodecreatedchange.cpp src/core/qnodecreatedchange.h src/input/frontend/qaxisactionhandler.h src/input/frontend/qinputaspect.h src/input/frontend/qkeyboardhandler.h src/input/frontend/qmousedevice.h src/input/frontend/qmousehandler.h src/input/frontend/qphysicaldevicecreatedchange.h src/input/input.pro src/logic/qframeaction.h src/plugins/sceneparsers/assimp/assimp.pro src/quick3d/imports/input/importsinput.pro src/quick3d/imports/render/importsrender.pro src/render/backend/trianglesextractor.cpp src/render/framegraph/qclearbuffer.h src/render/framegraph/qlighting.h src/render/framegraph/qstateset.h src/render/frontend/qrenderattachment.h src/render/geometry/qabstractattribute.h src/render/geometry/qabstractbuffer.h src/render/geometry/qattribute.h src/render/geometry/qboundingvolumespecifier.h src/render/geometry/qbuffer.h src/render/materialsystem/qfilterkey.h src/render/materialsystem/qparameter.h src/render/materialsystem/qparametermapping.h src/render/renderstates/qblendstate.h src/render/renderstates/qdepthmask.h src/render/renderstates/qpointsize.cpp src/render/renderstates/qrenderstatecreatedchange.cpp src/render/renderstates/qstencilop.h src/render/renderstates/qstencilopseparate.h src/render/renderstates/qstenciltestseparate.h src/render/texture/qabstracttexture.h src/render/texture/qabstracttextureimage.h src/render/texture/qtextureproviders.h Change-Id: I894d7781042cabdaa0cac690c198b57a41127bd4
| * Make public headers compile with -Wzero-as-null-pointer-constantMarc Mutz2016-03-011-2/+2
| | | | | | | | | | | | | | | | ... or equivalent. Task-number: QTBUG-45291 Change-Id: I1453477ad718335ca6c5c0c3447539cb93e21176 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Remove QAbstractAspect::onCleanup()Sean Harmer2016-03-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | This was actually called both when unsetting a root entity and during final shutdown. Remove it and move work it was doing to the overrides of onUnregistered() for now. Will need another look when we finish this refactoring to also include backend node destruction. Task-number: QTBUG-51421 Change-Id: I2f96ede4006fea3a4766d15cf6e162452dd58321 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | Remove QAbstractAspect::onRootEntityChangedSean Harmer2016-03-171-2/+0
| | | | | | | | | | | | | | | | No longer needed, as we can do all needed in onEngineStartup(). Task-number: QTBUG-51421 Change-Id: I64487b9f118aaad073e4e060bc5fd36f3a6dd16a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add rootEntityId() functionSean Harmer2016-03-171-0/+3
| | | | | | | | | | | | | | | | | | This will allow us to remove onRootEntityChanged() virtual and instead do the work in the onEngineStartup() virtual. Task-number: QTBUG-51421 Change-Id: Ie492cb29aed2439a38491b373ece94ee32ee8240 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Rename onStartup/onShutdownSean Harmer2016-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | onEngineStartup/onEngineShutdown is more descriptive of when these functions get called in the overall flow of operation. Task-number: QTBUG-51421 Change-Id: I09dd7dfa2e3ce961a67de7fd150bf027226849ae Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | Add QAbstractAspect::onUnregistered() virtual functionSean Harmer2016-03-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | Makes the API symmetric between registering and unregistering. Also moved implementations around to be near each other. Task-number: QTBUG-51421 Change-Id: Ia26ced9b18c62e0b88d80d599d3aaf3bb240c778 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | Rename QAbstractAspect::onInitialized() to onRegistered()Sean Harmer2016-03-161-1/+1
| | | | | | | | | | | | | | | | | | This is the first step in reworking the startup/shutdown code to simplify it and provide a more symmetric API. Task-number: QTBUG-51421 Change-Id: Ib06be1e7adb3f3d52b31d5e0a1ec598f39543f9a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QAbstractAspect: make virtuals non-pureMike Krus2016-03-121-3/+3
| | | | | | | | | | | | Change-Id: I093ed0747833964d435a8b69616a75cd95809c65 Task-Id: QTBUG-51424 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QBackendNodeFunctor -> QBackendNodeMapperPaul Lemire2016-02-231-5/+5
| | | | | | | | | | Change-Id: Ie81f98c22a3a5cc97e31671f9455d597a0e20b39 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Unify license header usageAntti Kokko2016-01-261-11/+14
| | | | | | | | | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I8eac0cd6bbc276a56df487249cc459c0d4fab165 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* | QAspectEngine/QAbstractAspects: get rid of setDataPaul Lemire2016-01-221-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Getting rid of set data and the refactoring on setting the surface implies that: - Given the FrameGraph configuration, there may be several RenderViews each having a different RenderSurfaceSelector/Window - This means that the Renderer/QRenderAspect can't know about the surface before reading the scene - This means that the Renderer may be dealing with more than 1 window - This means that initialization, render and shutdown procedures will have to be updated accordingly Therefore the Renderer was refactored to: - Be initialized without knowing about a surface - For each RenderView, check the surface and if different from the previous one: * Make the context current with it * Create the appropriate glHelpers (as Surfaces may have != formats) TO DO: - Fix picking - Fix windows exposition - Fix shutdown / detection of all windows beging closed Change-Id: I49d070b05f46be4b26cfb57e494feba145d1da9c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make QAspectJobProviderInterface privateKevin Ottens2015-12-171-4/+5
| | | | | Change-Id: Ib56156893b974110e0ceec1685b791828afd7ecb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QSceneObserverInterface privateKevin Ottens2015-12-171-5/+0
| | | | | Change-Id: I98454ea6ed5bd5bbfed550317fedbf8ee47a1f8f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QBackendNodeFactory privateKevin Ottens2015-12-171-5/+0
| | | | | Change-Id: I0edb9fb0444d8a4a9b77550d5dd32d36d501683c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make clearBackendNode privateKevin Ottens2015-12-171-1/+0
| | | | | Change-Id: I8645116f21a5c0b7a9c0785c1eeebd019bad7ad3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* executeCommand is meant to be reimpl not calledKevin Ottens2015-12-171-2/+4
| | | | | | | | We make sure it can be reimplemented in sub-classes but it will be called only by QAspectEngine own executeCommand method. Change-Id: I777889fd082a56af70cdadbba9b55d2532db8869 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Get rid of isShuttingDown()Kevin Ottens2015-12-171-2/+0
| | | | | | | | | It is misplaced (if need be it'd be more logical on QAspectEngine API) and used only once from a place where we already depend on private API anyway. Change-Id: I55fcee3a11830515c90e984a186040312898df56 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move services() and jobManager() to the pimplKevin Ottens2015-12-171-5/+0
| | | | | | | This way we avoid leaking private types through public API. Change-Id: Ifb30d7e57d8b995bba8cf9a95ae77f8d7818d79a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move QAbstractAspect::registerAspect() to the pimplKevin Ottens2015-12-171-2/+0
| | | | | Change-Id: Iabc9afe59052e69725a82fb6bdb42f0dfae7fc91 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove QAbstractAspect::setRootEntityKevin Ottens2015-12-171-3/+4
| | | | | | | We switch to a more resilient private virtual instead. Change-Id: I90710c7873571ca0a40f7cc939282344b20a59f0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove dead codeKevin Ottens2015-12-161-1/+0
| | | | | Change-Id: I10a42393baacf8788383e81c75f77b29898f2213 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* visitNode is not needed as virtual anymoreKevin Ottens2015-12-161-2/+0
| | | | | Change-Id: I2cd3cd7db8722d63e58be701aa2ae00fb19a1d2a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Only aspect subclasses register backend typesKevin Ottens2015-12-161-4/+4
| | | | | | | | Also make registerBackendType public on QInputAspect for now since its plugins will also need to register backend types. Change-Id: I7b07162d806b5644daf12f6b22161677f16da38e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make sceneNodeAdded/Removed privateKevin Ottens2015-12-161-3/+3
| | | | | Change-Id: Id559daa0d4e0fe714fd9742ec0146172f4b9be9b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Factor out in QAbstractAspect common behaviorKevin Ottens2015-12-031-1/+7
| | | | | | | | There was code involving the node visitor duplicated in several aspect, move that logic back into their common base class: QAbstractAspect. Change-Id: I47320e93691edb43e3cccdd81753423816ad955d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add command support on aspects and QAspectEngineKevin Ottens2015-12-021-0/+2
| | | | | | Change-Id: I5c3847a2779b691a2748083fb768b37d1f629274 Task-Id: QTBUG-49683 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAspectFactory can now also give registered name of an aspectKevin Ottens2015-12-011-2/+2
| | | | | Change-Id: I8f89eefb06e20943f7abb82d461b5e90fd9799f9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move the QT3D_REGISTER_*_ASPECT macros to QAbstractAspectKevin Ottens2015-12-011-0/+26
| | | | | | | First step toward turning QAspectFactory into a private class. Change-Id: Ia62aae820fde1ab3cee0c5852d10981c6b9f4970 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove unused enumKevin Ottens2015-11-301-11/+0
| | | | | Change-Id: I88b449aa96dd8dfe81162ad2140f3efb374f8a65 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove aspect enumsMike Krus2015-11-211-3/+1
| | | | | | Change-Id: I5cd1c2ddb54d32a7d650e2a44f48d9f67f9821a2 Task-Id: QTBUG-49001 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAbstractAspect: make registerBackendType publicPaul Lemire2015-11-161-4/+4
| | | | | | Change-Id: I04716bf80e403a5bb63988b78cec2febb295cfcf Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Move Qt3DCore into Qt3DCore namespaceSean Harmer2015-10-131-5/+5
| | | | | | | Update other aspects, tests and examples accordingly. Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add onStartup() and onShutdown() virtuals to QAbstractAspectSean Harmer2015-08-061-0/+2
| | | | | | | | | | | | | Gives aspects a chance to do work just prior to and just after the main loop in QAspectManager. Specifically the shutdown functionality is required for the upcoming logic aspect to ensure a clean shutdown. Added the onStartup() method for symmetry. Change-Id: If5f32d62629543cdceb2e6e3ff6383747acb7c99 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make it possible for aspects to detect when being shutdownSean Harmer2015-08-061-0/+2
| | | | | | | | This allows aspects and jobs to not queue up blocking work on the main thread during a shutdown which may result in a deadlock. Change-Id: I2596f1861cabd43ce0102909874b0e5d1971bd5a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove unnecessary metatype declarationsSean Harmer2015-06-081-2/+0
| | | | | | Task-number: QTBUG-46539 Change-Id: I0e9e2d405da2fa5ecc2fc8b8efece6f7364e1b39 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Copyright header change.Mika Salmela2015-02-091-19/+14
| | | | | | | | As for preparation for Qt5.5 release the copyright header is updated to correspond the current license requirements. Change-Id: I36632918b66f455539453b42c369689fb11298ec Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Introduce QBackendNodeFactoryKevin Ottens2015-02-081-1/+3
| | | | | | | | This interface will be provided by aspects and used by backend nodes when they need to resolve a frontend node to a backend one. Change-Id: I695b1c5027826377c3e5ac7d2a05ca653148b96f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add QServiceLocator and skeleton system and OpenGL info servicesSean Harmer2015-01-281-0/+2
| | | | | Change-Id: I587d4d9f6065e377e7254ca916fdab2c0527ac30 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove unneeded forward declareKevin Ottens2015-01-231-3/+0
| | | | | Change-Id: Iaf7059d8fea1407bebfd6dd6f88d2643b07e169c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>