summaryrefslogtreecommitdiffstats
path: root/src/render/frontend
Commit message (Collapse)AuthorAgeFilesLines
* Register QShaderImage in QRenderAspectPaul Lemire2019-06-051-0/+4
| | | | | | | | And add required ShaderImageManager Change-Id: I4b3347d6dc4b70690abea0486c933f5a508b057f Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Merge remote-tracking branch origin/5.13 into devPaul Lemire2019-04-1528-35/+33
|\ | | | | | | Change-Id: Ib5c04e9941aeea1a4cd27519b94b9a53e8349ea3
| * Switch export macros to standard formKai Koehne2019-04-0227-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Merge branch '5.12' into 5.13Paul Lemire2019-04-021-7/+5
| |\ | | | | | | | | | Change-Id: If17511da64dd666a536408aa3cb3178ef6db0403
| | * Load static plugins when QT_NO_LIBRARY is setAnton Kreuzkamp2019-02-221-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QT_NO_LIBRARY was set, QRenderPluginFactory::create and QSceneImportFactory::create would simply do nothing, causing no plugins to ever be loaded. On static builds with QT_NO_LIBRARY plugins can still be used by using static plugins. The plugin factories omit them, even though QFactoryLoader, which they both rely on, supports loading static plugins when QT_NO_LIBRARY is set. Commit d964eab8 did a similar thing for QSceneImportFactory and QInputDeviceIntegration. Task-number: QTBUG-72378 Change-Id: I97912a34940e821bda6c0ae830baff4d773451f3 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-091-3/+3
|\| | | | | | | | | | | Change-Id: I8daaee9c3a2667893be118613979bc7e07e26147
| * | QML: Properly revision new signals and slots in 5.13Kai Koehne2019-03-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | All new signals, slots, ... available in QML should be revisioned. Change-Id: Ib91c65b2bcd64f93d8f536c6cb534390b8689d05 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Rework internal Texture HandlingPaul Lemire2019-03-041-26/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove internal GLTexture sharing - Remove dataFunctor data sharing - Simplify the overall texture process: 1) Look for dirty textures (either a property on QTexture or a referenced QTextureImage has changed) 2) Update GL Resources - Create a GLTexture for a given Texture if it doesn't exist - Update GLTexture to reflect Texture state - Perform actual GL texture creation and or upload (call functors at this point) - Cleanup GLTextures when matching Texture node has been destroyed This will provide an easier maintenance over time as it drastically simplifies the handling of textures and removes most of the coupling. Furthermore this will make it possible to send texture updates on a QTexture node to update texture content without having to declare QTextureImages which would not have been (or would have been a lot harder) to do. In practice, I doubt most people were even aware of the internal texture sharing in the first place. [ChangeLog][Qt3DRender] Textures: internal data sharing removed Change-Id: I02867c8105e29eb1e193884e3899062f795f32f4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Add QNoPicking FrameGraph nodePaul Lemire2019-02-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows to disable execution of picking computations for a specific FrameGraph branch. [ChangeLog][Qt3DRender] QNoPicking: control picking execution in the FrameGraph Change-Id: I5e82eeee9d04d48cfc39a6126d30d36eab61ea77 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Add a viewport property to QPickEventGiulio Camuffo2019-02-251-0/+1
|/ / | | | | | | | | | | | | | | | | The new property will contain the viewport in which the input event originated. This is useful in cases where an entity with an ObjectPicker visible in multiple viewports wants to react differently based on which viewport was clicked. Change-Id: Ic5fb6393f3c3087cc3f54cd68c025d0e59ec2f20 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QObjectPicker and QPickingSettings NearestPriorityPick picking modePaul Lemire2018-12-122-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Add a new priority property on QObjectPicker and a new QPickingSettings mode. This will select the result with the highest priority if there are several results on a given ray. If we have several results with identical properties, the result with the closest distance is selected. [ChangeLog][Qt3DRender] QObjectPicker: add a priority based result selection Change-Id: I7af12db6e163c3c2d9dad696e6d9f9bbbee064ed Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-111-0/+1
|\| | | | | | | | | | | | | Conflicts: src/render/renderers/opengl/textures/gltexture.cpp Change-Id: I57e9a296dc15f0b5dc3af3664f698bdc799c4bb5
| * Doc: Fix various documentation warningsTopi Reinio2018-11-071-0/+1
| | | | | | | | | | Change-Id: I3eecd06bba9438b5aa472f3ba7ecaecdeda985e2 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | QComputeCommand allow to control the run behaviorPaul Lemire2018-11-143-5/+117
| | | | | | | | | | | | | | | | | | It can either be Continuous, like it was until now or Manual. When in manual mode, the compute shader will only be executed by calling trigger() Change-Id: Icaae24f4691ccd821297f967d564e7a883fa60b5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-031-0/+6
|\| | | | | | | Change-Id: I95431b48ee9828be602c088cdd798fabbd1723ef
| * Doc: Add doc to undocumented methodsNico Vertriest2018-11-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | - qcomponent.cpp - qbackendnode.cpp - qjoint.cpp - qskeletonloader.cpp - qframeaction.cpp - qscene2d.h - qrenderaspect.cpp Change-Id: I25881dee19d2d01f948bfaf4a156a97f6caaea73 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Implement WaitFence/SetFence handling into the rendererPaul Lemire2018-10-121-5/+10
|/ | | | | | | | Slightly reorganize jobs between jobs needed for rendering and jobs that should run even when no rendering is required. Change-Id: I02d262efd8cb46c71c40ac6dbcd4d1b25bb725e1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-211-2/+1
|\ | | | | | | Change-Id: Ic7b387e96c7976772c6c1a5f88da52524d9b4010
| * Fix: Do not enforce TextureImage to be parented only by TexturePaul Lemire2018-07-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This behavior prevented using TextureImage not directly parented by the Texture that uses them (assert would be triggered). In turn, this also prevents sharing a TextureImage among several Texture instances which is counter productive since this is where the data is actually stored. This patch fixes this issue. It removes all direct coupling between Texture and TextureImages. Now Texture only contains the list of TextureImage ids it references. This allows to not make look-ups into the TextureImageManager to retrieve handles, which could be an issue if TextureImages have not yet had their backend created. TextureImage doesn't keep track of the referencing texture that uses it anymore. Instead, we let the renderer do the job of checking if any of the TextureImage referenced by a Texture has changed to trigger actual Texture update. Change-Id: I3c63379d0f4b314e9b53f225870eeaded0bb4aec Task-number: QTBUG-69407 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-06-301-2/+2
|\| | | | | | | Change-Id: I5dd73d2e029c625fd4a502cdfa68a51cca6bdc4c
| * Doc: Fix QRenderAspect \inmodule commandTopi Reinio2018-06-271-2/+2
| | | | | | | | | | | | | | | | Remove the full stop from the \inmodule command, and add it to the \brief command. Change-Id: I9b149d048f5ec23170347ba942258a8108bebb66 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-06-232-4/+7
|\| | | | | | | Change-Id: I59141daa9207bfaadd0bdda80b1dddf14ce6e7fb
| * Merge "Merge remote-tracking branch 'origin/5.11.1' into 5.11" into ↵Qt Forward Merge Bot2018-06-191-1/+4
| |\ | | | | | | | | | refs/staging/5.11
| | * QRenderAspect: properly register functor for QAbstractSkeletonPaul Lemire2018-06-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSkeletonLoader had been registered by mistake instead of QAbstractSkeleton. This lead to a failure to create the backend node for a QAbstractSkeleton in the case where one would use a QSkeleton instead of a QSkeletonLoader. Also properly unregister QArmature, QJoint and QAbstractSkeleton Task-number: QTBUG-68781 Change-Id: I72f4debc406548b249ba4adc46d6028d469a6b22 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | Doc: Add missing dots (qt3d)Paul Wicking2018-06-192-3/+3
| |/ | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I4226b8b9d70548b6921948c5ea47520f40f5df98 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* / SkeletonManager: rename dirtySkeletons to takeDirtySkeletonsPaul Lemire2018-06-081-1/+1
|/ | | | | Change-Id: I4e8b5778e9407ea4472f552febb1f04b544ea6f3 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Merge remote-tracking branch 'origin/5.11.0' into 5.11Qt Forward Merge Bot2018-05-092-2/+2
|\ | | | | | | Change-Id: I666d4ca1ad39f81e41a9b47a8828d1689ff2b33e
| * Doc: Use the correct module command for QML typesTopi Reinio2018-04-242-2/+2
| | | | | | | | | | | | | | | | | | A number of QML types used \qmlmodule instead of the correct \inqmlmodule. Change-Id: I330f664ede6d4d1a05efef8ee13ad33105ade19b Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Doc: Add note about projectionMatrix effect on projectionType in QMLPaul Wicking2018-04-261-0/+4
| | | | | | | | | | | | | | | | | | | | Replicate information provided in the CPP class to expose the information for readers of QML documentation, as suggested by bug reporter. Task-number: QTBUG-64386 Change-Id: If448e0a54f9c238938a9d930a0a0edcf72efa2aa Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Doc: Fix documentation warnings related to Clang QDoc parserTopi Reinio2018-04-203-7/+8
|/ | | | | | | | | | | | | | | | | | | | | 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>
* AbstractRenderer: add setOpenGLContext methodPaul Lemire2018-03-191-1/+1
| | | | | | | | | | This will allow to only deal with the AbstractRenderer class interface in the QRenderAspect. Then in practice, the setOpenGLContext function may just be ignored by renderers which don't care about OpenGL Change-Id: I1adc9c203e78a31ef1054a3be36e703b4e1a6f3e Task-number: QTBUG-61151 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Remove QItemModelBuffer: unused and incompletePaul Lemire2018-03-193-478/+0
| | | | | | | Also this shouldn't be tied to the Qt3DRender aspect Change-Id: Ia7c70094f3faa8a95c7440549a56d6f5ca517348 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Move Renderer specific classes into new folderPaul Lemire2018-03-191-0/+2
| | | | | | | | This is another step toward isolating the renderer from the render aspect Change-Id: I4031675b961d6645b65bbe05cf62d150993038b0 Task-number: QTBUG-61151 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Documentation for ray castingMike Krus2018-03-071-8/+25
| | | | | | | | Also updated object picker and pick settings and made raycaster components non-sharable. Change-Id: Ief3e5dcb3eefdd94c05e7a4e914b43d56b43e24a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Doc: Fix documentation warnings for Qt 3D RenderTopi Reinio2018-02-284-10/+9
| | | | | | | | | | | | | This change fixes multiple QDoc warnings for Qt 3D Render that are related to how Clang parses the source code and the \fn QDoc commands. A number of changes are related to preventing documentation for private classes from generating warnings. We still have a number of 'No documentation for ...' warnings left - those are not addressed in this change. Change-Id: Ic92a729496a81e7869060811ed7dd23408cff833 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Load textures in a single framePaul Lemire2018-02-281-1/+4
| | | | | | | | | | | | | | | | | Because of texture sharing, Qt3D compares functor before executing them. Instead of blindly loading a TextureImage functor which could turn out to not be used, Qt3D required 2 frames to fully update a texture. This behavior has been removed, now when a texture image functor is updated, it updates the texture in one frame. It is assumed that the user is responsible for declaring only TextureImage that he is actually going to use. Any scene that uses OnDemand rendering and frequently changes a texture image functor can be used to test this. (ex-painted-cube is a good example for KDAB) or paintedtexture-cpp in manual tests Change-Id: I8c2f13876244a862633e10e472e2b49cbd6e126b Task-number: QTBUG-63561 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Revert "Keep rendering in sync with aspect jobs by adding barriers"Paul Lemire2018-02-282-39/+34
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 46319648436814afb5a77755dde6681e304befaf. We want to be able to render one set of RenderViews for frame n while concurrently building RenderViews for frame n + 1. The reverted commit removed that behavior which reduced the CPU time available to prepare a frame. This would cause on some scenes a failure to meet the ~10ms budget we have to prepare a frame. This is therefore a regression. The root cause behind this regression is that a job cannot be executed until all the jobs which have been previously launched have completed. The proposed solution would be to instead add an OpenGL command thread that can be used to load graphics resources required for the RenderViews directly when required. This would in turn allow to cache RenderViews and keep the concurrent behavior of RenderView submission and creation. With that goal in mind, the following patches will be rebased and updated https://codereview.qt-project.org/#/c/189309/ https://codereview.qt-project.org/#/c/189310/ Change-Id: I4879047c45986a0e615e3aef7b7352f82a04a9da Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add debug support for SphereMike Krus2018-02-232-0/+17
| | | | | Change-Id: I8262ada29898df37c33855b9cb33aead419b02a6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-211-0/+12
|\ | | | | | | | | | | | | | | Conflicts: src/render/backend/renderer.cpp tests/auto/auto.pro Change-Id: Idc5bb088ae7f591809f8795124a3e44410bf4cf9
| * Fix OnDemand rendering by keeping ComputeDirty from being re-enabledSvenn-Arne Dragly2018-02-141-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation would reset ComputeDirty every frame if markDirty(AllDirty) had been called earlier. This would break the OnDemand rendering policy because every frame would be rendered even if there were no changes or no compute commands in the scene. This change removes the code that would re-enable the ComputeDirty flag every frame and documents that the user must either set the rendering policy to Always or trigger the rendering of a new frame if the rendering policy is set to OnDemand. Change-Id: Ide03a3a49ee1670fd9d67ed47454c6679219765d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/5.10' into 5.11Sean Harmer2018-02-154-76/+82
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Render: Use SIMD Vectors and Matrices in the backendPaul Lemire2018-02-022-43/+43
| | | | | | | | | | | | | | | Change-Id: I19b3b2f8fcb06eb2bc600ebe370465dd15a8eabc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Keep rendering in sync with aspect jobs by adding barriersSvenn-Arne Dragly2018-02-022-34/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that jobs that depend on a specific state of the renderer (such as context being initialized) never run before this is the case. This reduces the number of possible race conditions and checks we need to do to ensure the jobs and the renderer are in the correct state. This way we no longer swap buffers when nothing has been rendered, which in turn makes sure that we only draw one frame when the render policy is OnDemand and there are no changes. This change also adds a number of assertions on pointers to resources to make it easier to detect missing job dependencies. Finally, this change overhauls the job dependencies in Renderer and RenderViewBuilder. Task-number: QTBUG-66024 Change-Id: I3e4e9dd0dd53b5c88f5c1b17d68df42f28eae794 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Introduce QScreenRayCasterMike Krus2018-02-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split common functionality into abstract base class. Both frontend classes use the same backend implementation. Split common pick functionality for the object picking and ray casting jobs into abstract base class. Change-Id: Ieb8bdcf65d81db12234841d72c6cb0160e145bf6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Ray casting jobMike Krus2018-02-011-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Does the intersection calculations and sends hits back to frontend object. The entity pointer is updated in the front end before emitting the signal. This is done using private friend method to avoid detaching the hit object and causing a copy. Change-Id: If2fa0573f8f7120f2dcbb433c46efe1859f0eb5f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Initial implementation of ray casting APIMike Krus2018-02-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adds frontend and backend node classes and the registration mechanism in the render aspect. Change-Id: I258e25fea98170433c8ed9d3fad6868a83beda43 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge branch '5.10' into devSean Harmer2018-01-261-1/+1
|\| | | | | | | | | | | Change-Id: I4728b29c349a16867951a781c9417054c798e04a
| * | SceneManager: rename pendingSceneLoaderJobs()Paul Lemire2018-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Renamed to takePendingSceneLoaderJobs() as the name better indicates we are resetting the vector of jobs internally. Change-Id: I68a16139994552b7b26f1cf88a206a61a30950e0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10' into devAndy Nichols2018-01-232-23/+52
|\| | | | | | | | | | | Change-Id: I2167d8d1d0050c7ca94180785a59f8753badaab4
| * | Merge branch '5.9' into 5.10Sean Harmer2018-01-222-23/+52
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/frontend/qcamera.cpp tests/auto/render/render.pro Change-Id: I8f848a1f863d07eecb328965fbe27d74b8d442f1