summaryrefslogtreecommitdiffstats
path: root/src/quick3d/imports
Commit message (Collapse)AuthorAgeFilesLines
* Refactor Scene3D to work with both RHI and GL Qt3D renderersPaul Lemire2020-07-293-160/+474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Depending on whether we are using RHI or GL we need to either trigger the rendering after the beforeRendering or beforeRenderPassRecording have been fired -> beforeRendering The RHI command buffer is set up but nothing has been recorded yet. This is what we want for the RHI backend but we will need to make sure we don't call begin/endFrame nor use swap chains other than the one QtQuick is using. This means RenderSurfaceSelector won't be possible. -> beforeRenderPassRecording The RHI command for buffer uploads have been uploaded but the actual RenderPass draw calls have yet to be made. The screen has been cleared already, so this is the best place for the GL backend which expects the screen to have been cleared. - The GL backend can use a QOpenGLFrameBufferObject but that is not possible with the RHI backend. - The RHI backend uses a custom QRhiRenderTarget that takes care of blitting its color attachment into a QRhiTexture which is then bound to a QSGTexture The overall Scene3DItem/Scene3DRender architecture remains the same: - processChange - Render Qt3D content into Texture - Set texture on a custom QSGNode quad Change-Id: Id6c317342d0a227d5295cbfefefc3ed12da160d7 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Use QList instead of QVector in implementation and docsJarek Kobus2020-07-095-6/+6
| | | | | | | | | Fix some const correctness. Use list-initialization. Task-number: QTBUG-84469 Change-Id: I9c56742581f48f89a3b02e4121fae414117c7a25 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderQueue: switch to std::vectorPaul Lemire2020-07-031-2/+2
| | | | | Change-Id: I49ab3985ee01e40950bcd981dc77139a28f8db6a Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Delete offscreen surface when doneMike Krus2020-06-291-0/+2
| | | | | | | | Task-number: QTBUG-84905 Pick-to: 5.15 Pick-to: 5.12 Change-Id: I2c9ddcf415e3f7565c1ba606adb3ab4c6eadfebb Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Remove the OpenGL Render ThreadMike Krus2020-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | We're trading a bit of performance at submission (since we could start preparing the next frame while submitting the current one) for convenience and ease of maintenance. Besides, this allows to remove a thread and in cases Qt3D was used with Scene3D, which is likely the majority of cases, the RenderThread was not used anyway. To control whether the QRenderAspect should submit on its own or not, a new Submission type enum with values Automatic/Manual was added. This allows the QRenderAspect to automatically perform command submission when Qt3D is used on its own. For other cases when Qt3D is integrated into a 3rd party engine or with Scene3D, the Manual mode is used to let the QRenderAspect render only when it is told to do so. Change-Id: Idc270b5a07bcb9ea9e61674a69c6b8cf6ccd8182 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Handle config flags to turn aspects on or offMike Krus2020-06-182-5/+1
| | | | | | | | | Also restores RHI option but it's off by default. Moved render module config to renderer plugin folder as those are the only options for now. Change-Id: Ie102e5b9365b3bea8f4bc97cb76b3a19851b1fa5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Scene3DRender: connect to beforeRenderPassRecording to perform drawPaul Lemire2020-06-173-24/+1
| | | | | | | | | | | | | | | | | | | | Previously we were connecting to beforeRendering which happens prior to RHI having created its render pass. When RHI creates its render pass, it clears the rendering surface. In the case Scene3D is used in Underlay this would therefore clear the 3D content. We now connect to beforeRenderPassRecording which happens after beforeRendering when RHI has created its RenderPass (and therefore cleared the screen) but prior to drawing/recording commands for the actual QtQuick rendering. This allows Qt3D to clear (if FrameGraph has that operation) or not and should work for both Underlay and FBO rendering modes. That being said, at the moment, apitrace shows that QtQuick still clears before drawing after beforeRenderPassRecording what emitted. This lead to Scene3D in Underlay compositing mode to not be visible. Change-Id: I55bd5ae9f26926f06e9e50793da316918b78b6b7 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* QNode: remove property tracking modePaul Lemire2020-06-172-4/+0
| | | | | | | This serves no purpose since the synchronous synching was put in place. Change-Id: I4509cc348168d614388f73a26f8420b26629ace6 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Qt3D reset OpenGL state prior to drawingPaul Lemire2020-06-171-5/+1
| | | | | | | | | This works around that QQuickWindow::resetOpenGLState has been removed in Qt6 and moved to the QQuickFrameBufferObject class which we don't use. Change-Id: I292fc65c160e964769aed360e91bf14525abbb0e Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Remove use of clear before rendering settingsMike Krus2020-06-171-12/+13
| | | | | | | | Gone in 0d43e21429ee23442ec3a99f641a5665d66e75e2 in QtDeclarative Rendering will need updated to use new signals Change-Id: I90e34fa974e35b306c6b480643a4a31f7a0eff8c Reviewed-by: Liang Qi <liang.qi@qt.io>
* Update Scene3DSGMaterial following latest API changesPaul Lemire2020-06-162-2/+3
| | | | | Change-Id: If7953e648c70319e0d1b978106f5f07cdd234f69 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Don't register Window typeMike Krus2020-06-161-2/+0
| | | | | | | Import QtQuick.Window instead. Change-Id: Ica99e295125b09f9489a80ed9c743dde9e97471a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Change how resources are bundled for Scene3dMike Krus2020-06-131-1/+1
| | | | | | | Fix static build Change-Id: Ifc2ef78694c2b8fe53961cee75371e5431fff9c4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update dependenciesMike Krus2020-06-121-2/+4
| | | | | | | | Commented out calls to resetOpenGLState which has moved in QtDeclarative. Leaves Scene3D and Scene2D in broken state. Change-Id: Ib1a5dcdde34c1bb177518dd891d123d3a5322d9d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix Scene3D to work with latest QtQuick SceneGraph RHI changesPaul Lemire2020-06-1111-102/+120
| | | | | Change-Id: If507aac8d48cc33fa7acf993ab77b76cdd70ee9a Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix animation cmake projectsMike Krus2020-06-052-2/+2
| | | | | Change-Id: If2a92b254ea7bb227f2fc608d93937de7088d805 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update dependenciesMike Krus2020-06-051-2/+5
| | | | | Change-Id: I71ffe477dfa052967c402ce49f45dab13de7b971 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Finish fixing QtQuick private-related build issuesJean-Michaël Celerier2020-06-042-1/+3
| | | | | Change-Id: Ia2b13dcc2c5489c464a70e69cac3088c173b7af8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Remove references to removed TexturedMetalRoughMaterialJean-Michaël Celerier2020-06-041-16/+0
| | | | | Change-Id: Ia1dd8d0441f6e6371cec574f7d937d6d94c57186 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add missing QuickPrivate dependencyJean-Michaël Celerier2020-06-021-0/+1
| | | | | Change-Id: I3d3e187af0ee1884becfe4fc52f2f2f055a743c9 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Update dependenciesMike Krus2020-06-011-1/+1
| | | | | | | Includes removal of Angle specific code Change-Id: Id257d4af1c31ff88edbfb07c073cdff9f4c6cdf7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for building with CMakeMike Krus2020-05-228-0/+285
| | | | | Change-Id: If6c887c6356a160a5f3fb906d38a341fff0c7b29 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix build for Qt6Mike Krus2020-05-062-5/+3
| | | | | | | | | | | | | - updated dependencies, excluding qtgamepad for now - fixed issues with Q_PROPERTY not supporting forward declarations - fixed for changes in QtQuick private API - fixed for changes in QtOpenGLVersionFunctions API - fixed for removal of QT_OPENGL_ES* macros - fixed for changes in QtConcurrent API - fixed RHI based build Change-Id: I42ccd2f101b7f0a78e2860c6d551722bf6710a11 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix Clang 10 warning about initialization in the wrong orderThiago Macieira2020-05-051-1/+1
| | | | | | | | scene3d/scene3ditem.cpp:151:7: warning: field 'm_renderAspect' will be initialized after field 'm_aspectToDelete' [-Wreorder-ctor] Pick-To: 5.15 Change-Id: I99ab0f318b1c43b89888fffd160b5cec60153bc9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch 'origin/5.15' into devMike Krus2020-04-2715-235/+251
|\ | | | | | | Change-Id: Id669d5c1aab29965eac0dabd1cb497e908dac23e
| * Merge remote-tracking branch 'origin/5.14' into 5.15Antti Määttä2020-04-217-217/+131
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp src/plugins/renderers/opengl/graphicshelpers/submissioncontext_p.h src/plugins/renderers/opengl/renderer/renderer.cpp src/render/backend/attachmentpack_p.h src/render/frontend/qrenderaspect.cpp src/render/picking/qabstractraycaster.cpp tests/manual/manual.pro Change-Id: I617b7e34bf7e11b2921bfc15e1b99c3e81891ec7
| | * Allow for when a Scene3D item switches screensAndy Shaw2020-03-137-217/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a Scene3D item switches screens then it will need to be reinitalized so that the supporting contexts, offscreen surfaces are set to use the same screen and not the original one. This ensures that the item is still rendered correctly on the new screen. This includes a manual test using QQuickWidget in separate windows that enables it going from one screen to the other. This is a fresh version after the previous version was found to have a bug shown in the scene3d-loader test which has now been resolved. Change-Id: I3c711e894018db52ec00a8a5d2e0fb0128743ab1 Done-with: Antti Kokko <antti.kokko@qt.io> Fixes: QTBUG-79192 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com>
| | * Fix OnDemand rendering crash when using QQuickWidgetMauro Persano2020-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Restore the original GL context when handling the QQuickWindow::beforeSynchronizing signal to prevent crashes. Fixes: QTBUG-82152 Change-Id: Ibcf3f7fbc1d9ec7b83a76fd617d7aa77ab82ba14 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * Revert "Allow for when a Scene3D item switches screens"Paul Lemire2020-02-187-124/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 648b7459e8a6ce8ce1f115a14da63d546b743439. Reason for revert: Introduces QTBUG-82275 Change-Id: I5514ad58707c086eaaab3203773614c939e461e8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| | * Revert "Add in a call to applyAspects() that accidently got missed"Paul Lemire2020-02-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 42c0dbc377af4d307747a32ca1c1fd267ce4337f. Reason for revert: Introduces QTBUG-82275 Change-Id: Ibf3cc3ea29260b57734517d984ef7a5d3244216a Reviewed-by: Mike Krus <mike.krus@kdab.com>
| | * Add in a call to applyAspects() that accidently got missedAndy Shaw2020-02-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This amends 648b7459e8a6ce8ce1f115a14da63d546b743439 which had moved the code into applyAspects() call but it was missed from the original setAspects() call. Change-Id: I431c07f260e6c91cbee155c052000d6e5081c4e7 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| | * Allow for when a Scene3D item switches screensAndy Shaw2020-02-077-218/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a Scene3D item switches screens then it will need to be reinitalized so that the supporting contexts, offscreen surfaces are set to use the same screen and not the original one. This ensures that the item is still rendered correctly on the new screen. This includes a manual test using QQuickWidget in separate windows that enables it going from one screen to the other. Fixes: QTBUG-79192 Change-Id: Id5bbc0d30d04ea4a945463238868b68283df0543 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
| * | Update plugins.qmltypes for 5.15Jani Heikkinen2020-04-088-16/+119
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-82253 Change-Id: I64a804c306e06076f185ffaf422a1cb1f93b055b Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Make Scene3DItem accept hover eventPaul Lemire2020-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | Otherwise we can't use hove events on things like QObjectPicker Change-Id: I50fcc8d02efda7792f2d35ea3dc461e5256efc5b Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | Fix documentation formatting for UnderlayMichael Brasser2020-03-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | \value breaks on blank lines, which led to the Underlay docs spilling out of the table. This lumps them all into a single paragraph, which still isn't ideal, but helps clarify where they belong. Change-Id: I9a64e1062a9d3f4d785bc44a538fa966239c06e8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Introduce QPickingProxyMike Krus2020-04-231-0/+2
| | | | | | | | | | | | | | | | | | | | | Lets user provide a separate mesh for picking. Change-Id: I30a61920e1673d8bc3473ca85046b236bad0a2af Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Add ability to override bounding data and trigger calculationMike Krus2020-04-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this, can set min and max extents of a geometry renderer which will avoid calculating it from the real geometry. Can also trigger the computation from user code (via public API) if user doesn't want to wait for next frame to get the data. Change-Id: I821bfb7c9d710a77a2b87ec607b4ed35a0c7f236 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Pull bounding volume info from front endMike Krus2020-04-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an entity has a bounding QBoundingVolume component AND that has a QGeometryView, the bounding volume can be computed by the core aspect and the results get pulled to the render backend. Otherwise, we use the old code which computes the bounding volume in the render aspect. This means we have 2 jobs to compute bounding volumes and that the core version must complete before the render aspect runs. Change-Id: I4de45e48fa0c4d40d3d5084f387abfed5ea1a2f8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Merge remote-tracking branch 'origin/5.15' into devMike Krus2020-03-101-1/+1
|\| | | | | | | | | | | Change-Id: Ida354e9c302ef968fbae78edd60a1ad1fabef477
| * | Doc: Fix incorrect use of \default QDoc commandTopi Reinio2020-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command, despite its name, does not document a default value of a property or a parameter. Instead, it's specific to QML properties, marking a property as a default QML property. Replace incorrect use of the command with descriptions of default values. Fixes: QTBUG-82645 Change-Id: I5b457062ffe2e8d81c358119e6bebc11b0063090 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Remove more deprecated codeMike Krus2020-02-271-6/+0
| | | | | | | | | | | | | | | Change-Id: I14695a93c4dc1b54c5ebc149b0fde0d328d75d7b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Introduce QGeometryViewMike Krus2020-02-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like QGeometryRenderer but not for rendering. A renderer can now be given a view to render. Further down the line, picking and bounding volume will be able to be given a view (could use a simplified non-renderered proxy to calculate the bounding volume). Change-Id: Ibe18b6e1d7c973e572bb3f2199c0776a4fc6c0e7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Geometry refactoringMike Krus2020-02-272-12/+12
| | | | | | | | | | | | | | | | | | | | | Move QBuffer, QAttribute, QGeometry to Qt3DCore. Change-Id: I59dfd091eefadcada93350b3aba955f40b304385 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Fix deprecations and warningsMike Krus2020-02-262-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular: - QHash::unite deprecated - QQuickWindow::createTextureFromId deprecated - also removed unused or deprecated code, and fixed out of order initialization Change-Id: Ia583654fcfcd654ca388575aa7716c282b134e33 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Remove custom deprecation macroPaul Lemire2020-02-128-8/+0
| | | | | | | | | | | | | | | Change-Id: If9fdd63d58b2f9d41dc3a6c99d1dde2245506d15 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Merge remote-tracking branch 5.15 into devMike Krus2020-02-0724-39/+567
|\| | | | | | | | | | | Change-Id: I731aa986e1cc45b3af920db1a23f256927beecf7
| * | Remove QtGui module path from OpenGL related pathsMike Krus2020-02-062-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Many are moving to opengl module in qt6, will make merging easier. Change-Id: I0ad08510e6999a5d887d9197fe2cb0dc21919fb9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | QShaderProgram: add a format propertyPaul Lemire2020-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Can be either GLSL (default) or SPIRV at the moment. This variable will be used by the rendering backend to know what type of shader code was provided (e.g with Vulkan, the GLSL could be internally converted to SPIRV) Change-Id: I1f9b734a675c581ef0721edc4464e466a18afbb0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | QMouseDevice: add updateAxesContinuously propertyPaul Lemire2020-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default behavior is to only update axes when one of the mouse buttons is pressed. This property, when enabled, allows to record X/Y axes value changes regardless of the state of the mouse buttons. [ChangeLog] QMouseDevice add updateAxesContinuously property Change-Id: Ib54a1e54c6c278ea08722760c2d317ec46437b2f Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | Add QRenderCapabilities to query GL about what is supportedMike Krus2020-01-201-0/+3
| | | | | | | | | | | | | | | Change-Id: I7981e7e4b514e5d15d66c82351f1ab2fe160d20d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>