summaryrefslogtreecommitdiffstats
path: root/src/render/frontend
Commit message (Collapse)AuthorAgeFilesLines
* fix stereo renderingAlexander Busse2024-03-191-1/+1
| | | | | | | Change-Id: I1f55f4ce10107b5d4b3f92e1cb022a0c6595186b Pick-to: 6.7 6.7.0 Task-number: QTBUG-123483 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Doc: Fully qualify \property, \qmlproperty, \typedef, \enumLuca Di Sera2024-02-1311-88/+88
| | | | | | | | | | | Upcoming changes to QDoc require API entities to be fully qualified; previously, QDoc maintained a list of 'open namespaces' that were part of matching the documented entity with its declaration, but that concept does not work for parallelized parsing where the order of processing can be arbitrary. Change-Id: I1662fb4692b5c91a2d9e33eb17708544d9cd1ebb Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* build system: fix unity buildsTim Blechmann2024-02-072-2/+4
| | | | | | | | | | | | | | we need to avoid polluting the global (or qt) namespace by moving the `using namespace Qt3DXXX` statements into the namespace where it's actually required. furthermore: * replace `QT_USE_NAMESPACE` with `QT_BEGIN_NAMESPACE`/`END` pair * exclude some translation units with name clashes inside anonymous namespaces Change-Id: I5301b55c6a0c7079602c759f5bde152354149880 Pick-to: 6.7 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Readability: use empty() instead of size() to check for emptinessAurélien Brooke2024-01-131-2/+2
| | | | | Change-Id: Icd578efe70a9bdaf5ffbd5c8e9500c370d655cc0 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add ability to target Left/Right back buffer to use with stereo modeAlexander Busse2023-11-092-1/+15
| | | | | | | RenderTargetOutput adds enums to target stereo buffers. Change-Id: I7d57ebbad200772e526416d34e2a12135abcec93 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Fix incorrect module/type names in \qmlproperty commandsTopi Reinio2023-06-061-2/+2
| | | | | | | | | | | | | | | Multiple \qmlproperty commands used a non-existent module identifier, or the name of the C++ module in place of the QML one. Also, in some instances, the C++ type name was used in \qmlproperty signature. Fixing these also makes a number of QML properties appear in the generated docs. Pick-to: 6.6 6.5 Change-Id: I452361d3b0397d3ce405a2fb28577c37a24f02e3 Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
* Remove qmake build filesMike Krus2023-03-171-52/+0
| | | | | | | | Except in examples Pick-to: 6.5 Change-Id: I31b06ddfc79f14dde3369518a76d57606daf939f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix incorrect usages of std::make_move_iteratorAurélien Brooke2022-12-191-6/+4
| | | | | | | | | | | | | | In several places, std::make_move_iterator was used to move from a const vector, which is not possible and fell back to copy. Use the existing Qt3DCore::moveAtEnd utility to ensure a move operation is actually happening. * When readability permits, pass directly a return value as second parameter; * Otherwise, std::move from a mutable vector. Change-Id: I56c8925bbdeab95257d0a7fa89cffcda53fd6451 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Load sceneparser plugins only when processing the first LoadSceneJobAurélien Brooke2022-12-152-8/+14
| | | | | | | | | | | Sceneparser plugins are not loaded anymore until a QSceneLoader is added to the tree, which improves Qt3D startup time. Note: the load is now done in the QAspectEngine "Main" thread instead of the QRenderAspect "Render" thread. Fixes: QTBUG-59468 Change-Id: I45482ba06acf4dbdf7d4ce2b1a4e06d5a09c6de9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-201-3/+3
| | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I1b3c7c4058726c55199fd8ba74b6d6890ad8dd93 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port from container::count() and length() to size() - V4Marc Mutz2022-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); a.k.a qt-port-to-std-compatible-api V4 with config Scope: 'Container'. Change-Id: I3b040fa72968753048fd669c073ae80c3ba1bdad Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Qt3DRender: includemocsMike Krus2022-06-2212-0/+24
| | | | | | | Task-number: QTBUG-103286 Pick-to: 6.3 6.2 5.15 Change-Id: Iaddad08bb469408ee975e463ac82c95870130cee Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use SPDX license identifiersLucie Gérard2022-06-2246-1748/+92
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I8105424281eed871037fa6c463871ca8829876b5 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Q*FActory: remove unused path argumentsThiago Macieira2021-11-232-36/+4
| | | | | | | | | | Cargo-culted from somewhere but not used in any of these classes. This just made the code bigger for no reason. Task-number: QTBUG-97950 Pick-to: 6.2 Change-Id: Ice04365c72984d07a64dfffd16b48632888ed664 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Replace QT_BEGIN_LICENSE:LGPL3 headerKai Köhne2021-08-105-55/+70
| | | | | | | | | | Replace outdated LGPL3 with LGPL header in src, and GPL3-EXCEPT in tests. Task-number: QTBUG-90321 Pick-to: 6.2 Change-Id: I3f6491cb402a993a4341a983c780337e8658c256 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Picking: reuse LayerFilterJob to perform layer filteringPaul Lemire2021-08-091-0/+2
| | | | | | | | | | This fixes picking for cases where multiple LayerFilters using different filter modes are present in the FrameGraph. This also reduces code duplication. Pick-to: 6.2 6.1 5.15 Change-Id: I19d0c2c5777930820ab950cbf2bfe08ef7d2484f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* QRenderAspect: look for opengl renderer by defaultPaul Lemire2021-08-051-1/+1
| | | | | | | | | | | Since rhi render plugin is not built by default, ensure we look for the OpenGL backend if QT3D_RENDERER is not set. Tests might fail otherwise. Pick-to: 6.2 6.1 Change-Id: I3bc268df9e29fb8fa28d0f424e56535db7bc9c57 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rerun bounding volume update jobs when entity enabled property changesPaul Lemire2021-07-091-3/+6
| | | | | | | | | | | | Otherwise, this results in the bounding volume being out of sync with entities (an entity initially disabled that gets enabled would have an empty bounding volume) until some other events in the scene triggers a rebuild. Pick-to: 6.2 6.1 5.15 Task-number: QTBUG-93035 Change-Id: Ia21eec0eb5601169e1789321080803a5aed12e82 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Change bounding update propagationMike Krus2021-06-212-0/+16
| | | | | | | | | | | | | | | Previously, bounding computation results from the core aspect were propagated to the render aspect via the front end objects. This introduces a job watcher which gets called with the results and the render aspect can update it's backend data directly. The watcher process method is called in the thread of the core aspect job but the render aspect job will wait for that complete anyway (since it depends on the core aspect job). Pick-to: 6.1 6.2 Change-Id: Ie59337f00025fd55fc723a7d105342e0b1e91d6c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove useless metatype declarationUlf Hermann2021-04-021-2/+0
| | | | | | | | | | The type in question has a Q_GADGET. It shouldn't need an explicit metatype and the manual metatype declaration conflicts with the automatically generated one. Pick-to: 6.1 Change-Id: I2a2cfafcb53f4bfbf3962ba15bc18f0f2d20a118 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Load rhi backend by defaultPaul Lemire2020-12-181-1/+1
| | | | | | Change-Id: I2c907539e1071aa511d0a25b21bb9ed476a471c0 Pick-to: 6.0 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Doc: Fix documentation warningsTopi Reinio2020-11-251-1/+2
| | | | | | | Pick-to: 6.0 6.0.0 Fixes: QTBUG-88842 Change-Id: Ie8ea1914c5e740c0c4bf25f4754a008aff6401cd Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix simple qdoc warningsPaul Wicking2020-09-091-1/+1
| | | | | | | Fix missing full stop after brief warnings. Change-Id: Ib3690c98e19eab4dc8ce59af5834cfa967fba548 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-08-031-0/+3
|\
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-141-0/+3
| |\ | | | | | | | | | Change-Id: Ib6c17c39034aefa66f90f985ed15d2f1cfd7ec99
| | * Unregister the event filter when the render aspect is unregisteredAndy Shaw2020-04-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents a crash when an event filter was used and the render aspect was being deleted but the event filters were being accessed still later on. Change-Id: I56586061d85f569f0cc9ffd5ec6b83a5455dd207 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Refactor Scene3D to work with both RHI and GL Qt3D renderersPaul Lemire2020-07-293-27/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 renderJarek Kobus2020-07-096-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use list-initialization. Task-number: QTBUG-84469 Change-Id: I826450646fc3c7118cae49c22a28058f47770e13 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Use QList instead of QVectorJarek Kobus2020-07-074-10/+10
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-84469 Change-Id: Ic726ce85e01190dbc64426388fd454c54ae3c3e3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | RenderQueue: switch to std::vectorPaul Lemire2020-07-032-4/+4
| | | | | | | | | | | | | | | Change-Id: I49ab3985ee01e40950bcd981dc77139a28f8db6a Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | QAspectJob: switch to using std::vectorPaul Lemire2020-07-023-20/+20
| | | | | | | | | | | | | | | Change-Id: I1314bd4d37ad17442ebd6287f571e41bc5d25490 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Render aspect: Dispatch events directlyMike Krus2020-06-302-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Events now delivered directly to the input aspect which dispatches them appropriately. The picking job still accumulates events within a frame. However, this opens the door to synchronous picking and event propagation control later on. Change-Id: Ic525bdce4e3d30455558fce9e385331364e49026 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Add ; to Q_UNUSEDLars Schmertmann2020-06-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I2e126d0be8efa0aa89c4a91a681b549f38c8cec4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Remove the OpenGL Render ThreadMike Krus2020-06-193-21/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Fix compile warnings related to deprecations or unused variablesPaul Lemire2020-06-081-1/+1
| | | | | | | | | | | | | | | Change-Id: I3d8fa0940a22f40bec3809b302cc59a40a5c3c52 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Fix a QString::arg() placeholderGiuseppe D'Angelo2020-06-081-1/+1
|/ / | | | | | | | | | | | | | | | | A placeholder was accidentally repeated, causing warnings (and wrong debug output). Change-Id: I2c09a538bf1a4b39e926fa9a8d1e6d991f524e01 Pick-to: 5.15 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Fix build for Qt6Mike Krus2020-05-062-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* | Merge remote-tracking branch 'origin/5.15' into devMike Krus2020-04-276-14/+163
|\| | | | | | | Change-Id: Id669d5c1aab29965eac0dabd1cb497e908dac23e
| * Merge remote-tracking branch 'origin/5.14' into 5.15Antti Määttä2020-04-211-1/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Destroy FBOs when RenderTarget node is destroyedPaul Lemire2020-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It appears we never destroyed FBOs which lead to bugs when destroying and recreating a RenderTarget Change-Id: I99b3df95b821670aa3bbd63209ff9bcc21afbf79 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| | * Check we remove a valid node when removing from node propertiesPaul Lemire2020-02-101-1/+2
| | | | | | | | | | | | | | | Change-Id: Ibcc4d9bfd9d0a9d7697151915f24a6eecc149f6d Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | Clean up filter debug outputMike Krus2020-04-161-3/+4
| | | | | | | | | | | | | | | Change-Id: I01c9448aab2dcebab9a025b2248e491fd92fd0af Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Adjust number of jobs based on number of render pathsMike Krus2020-04-141-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renderer currently creates a large number of jobs, most of them doing nothing, this quickly adds up when we have lots of branches. To keep those down, we adjust the number based as estimate of branches that have work to do (no draw detection will fail if it's not the leaf node). Also make RenderViewCommandBuilder and MaterialParameterGathererJob only run if necessary (and reset instance counter on each frame). Finally, only create the right number of MaterialParameterGathererJobs for the amount of updates required. Change-Id: I2d38c72589a38445d0110fc22a472fb9482d1a03 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | QRenderCapabilities::API add new API valuesv5.15.0-beta4Paul Lemire2020-04-081-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | To match with QGraphicsApiFilter and give use a chance to report if we are using them later on. Change-Id: I5858c36596da92c4d0da1f1cf31db6be6de48286 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | Fix job dependenciesMike Krus2020-03-271-4/+6
| | | | | | | | | | | | | | | | | | | | | Got dropped in previous refactoring Change-Id: I4fdffd329f79b2a650c4780b693a665f81a9770b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Add ability to dump filter statesMike Krus2020-03-261-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add button in overlay UI to dump: - the details of technique and render pass filters in the render views - the details of technique and render pass keys in the scene graph This is useful to understand why some objects are not rendered. Change-Id: I57a284081ec986e49e90c979042cc0c17ee0d1cf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Initial creation of RHI plug-in and refactoringJean-Michaël Celerier2020-03-161-1/+1
| | | | | | | | | | | | | | | Change-Id: Ifbb51003e15f798798040597b5f7224641e8147c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Allow Qt3DWindow to choose which graphics API to use on constructionJean-Michaël Celerier2020-03-114-2/+64
| | | | | | | | | | | | | | | Change-Id: Id3ff72a2eaa7f85844a546ef55dc3e1b71a14659 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Introduce QPickingProxyMike Krus2020-04-231-0/+3
| | | | | | | | | | | | | | | | | | | | | Lets user provide a separate mesh for picking. Change-Id: I30a61920e1673d8bc3473ca85046b236bad0a2af Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Pull bounding volume info from front endMike Krus2020-04-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>