summaryrefslogtreecommitdiffstats
path: root/src/extras
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.13' into ↵v5.15.13-lts-lgplTarja Sundqvist2024-01-042-9/+17
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I69854c833d45b39b1b0ccdb2c289162cd23d51a7
| * QText2DEntity: fix QTextureAtlas parenting that could lead to crashesPaul Lemire2023-02-132-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We rely on a DistanceFieldFont object to manage QTextureAtlas that hold the glyphs. The DistanceFieldFont/QTextureAtlas are supposed to be parented by the scene root to ensure that a QTextureAtlas lives as long as possible. DistanceFieldFont/QTextureAtlas are stored in a cache global to the scene to minimize the use of resources. When adding text elements, we can reuse atlases since the cache is global to the scene and only destroy an atlas (and remove it from the cache) when we know no more glyphs are referencing it. However we were mistakenly passing a null parenty to DistanceFieldFont instace of the scene root. This resulted on the QTextureAtlas not being parented by the scene root but rather by the first DistanceFieldRenderer to use the atlas. This meants that if the DistanceFieldRenderer were to be destroyed, so would the atlas (yet it would still be referenced by the glyph cache leading to crashes). Change-Id: Id84f6a651b162a4bb3c571b11388fd2429b231de Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit b1a135c547f38db0b2ce6b7bc4c4cccc43ef87d3) Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.11' into ↵v5.15.11-lts-lgplTarja Sundqvist2023-06-0939-1/+78
|\| | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I81f01dbde95cc9cd8e98c7fb9bf3a390aa27f379
| * Qt3DExtras: includemocsMike Krus2022-07-1538-0/+76
| | | | | | | | | | | | | | | | Task-number: QTBUG-103286 Change-Id: I07cce1da294d45a03bc1d0b9ef18629bba3a48e0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> (cherry picked from commit 400689d358f9c8dc05e556b04ff928ad32930c81) Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Fix various [=] lambda captures to capture [this] insteadMarc Mutz2022-07-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | C++20 deprecated the implicit capture of [this] in [=]. Move Q_D()s into the lambdas, where applicable. Change-Id: I345658b0ab9c4edc070f6fd111fce135dd757b14 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 42f96fe2074bc63cfb8a4ae71a7262d554661da2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-23115-2276/+2276
|/ | | | | | | | | | | This reverts commit 03e5f60e585701608c1181365faee484d7a1f14c. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I359e89ed77b1b2750607617d138ebb6c316f0296 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Update commercial license headersTarja Sundqvist2021-02-02115-2276/+2276
| | | | | | | | | | | | | | | | Updated header.COMM to the files in tqtc-qt3d. Examples, documentation files or tests are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4155 Change-Id: I139c8ad72c042b0900239decc36cfed4bc1c4951 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Document how the font is used for extruded textMichael Brasser2020-10-232-0/+16
| | | | | | | Change-Id: Ib18adc0809948092beaad6511bfddc68f22cc459 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 4ab96961366a8486deed675b27cfbe243ffa2363) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document the origin of extruded textMichael Brasser2020-10-212-0/+8
| | | | | | | | | | Many other mesh types use the center as the origin, so be explicit that extruded text is different. Change-Id: Iab443fab7a0e3a3f0a05dfcc7f17a837f69b2ae8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 41e457cbee41af546f964885e289dab8c9ac99de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Only set the format to 1.0 if it was not changed due to OpenGLAndy Shaw2020-09-301-1/+1
| | | | | | | | | | | | | | Since the userRequestedApi variable can be set when a second Qt3DWindow is created (since the environment variable is set after the first time). Then we should be sure to only set the format version to 1.0 if it was not already set due to OpenGL being used. Fixes: QTBUG-86436 Change-Id: Ib68f5f1f7f8651c1f20b66060fead7f3dcfb97e0 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 5a4a8e4f6644bc1d1cbfb1b0c96b096d6d4a9a5a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: Make Qt3DQuickWindow work with RHIJean-Michaël Celerier2020-04-222-88/+76
| | | | | Change-Id: Ic9bb79e780006e49d1baa13fd15f52344b81c86b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* rhi: Work needed for PBR material support in RHIJean-Michaël Celerier2020-04-221-0/+5
| | | | | Change-Id: Id0e7d343083afcefd93f9d581917e14baa994b7f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* rhi: Port most of Qt3DExtras materials to RHIJean-Michaël Celerier2020-04-2240-123/+736
| | | | | Change-Id: Iba20f047404b20c1e5b9bdcef917b3c2a1000d59 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* rhi: Handle RHI-required information in QShaderGraphJean-Michaël Celerier2020-04-2119-0/+1437
| | | | | Change-Id: I705843bbb1f6928c2e36b327469882e11fb9613e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch 'origin/5.14' into 5.15Antti Määttä2020-04-212-12/+25
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix typo in phong.inc.frag100Michael Brasser2020-04-191-4/+4
| | | | | | | | | | | | Task-number: QTBUG-83336 Change-Id: I295036a932eba64479b4b1a7e03e676d56cae92f Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * QMetalRoughMaterial: only remove parameters if addedPaul Lemire2020-02-101-8/+21
| | | | | | | | | | Change-Id: I2542334d004ae389238cdb08dd9d41f4014efccf Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Implement MetalRough shader optimization TODOMichael Brasser2020-03-274-20/+4
| | | | | | | | | | | | | | Calculate specularMipLevels only once, on the CPU. Change-Id: I694e3d5e45ea369875ac3ecff36f885b3f669bcf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add missing QPainterPath includesUlf Hermann2020-03-112-0/+2
| | | | | | | | | | | | | | Change-Id: I315a4b0615830ae32915a3c2e0ff6ad54b6d15fd Fixes: QTBUG-82792 Reviewed-by: Tuukka Turunen <tuukka.turunen@qt.io> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Allow Qt3DWindow to choose which graphics API to use on constructionJean-Michaël Celerier2020-03-112-3/+73
| | | | | | | | | | Change-Id: Id3ff72a2eaa7f85844a546ef55dc3e1b71a14659 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add missing documentationMike Krus2020-03-101-0/+18
| | | | | | | | | | Change-Id: I68d386671c271462a4b156ba9e0f61222a9c79c3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Remove QtGui module path from OpenGL related pathsMike Krus2020-02-061-1/+1
| | | | | | | | | | | | | | | | Many are moving to opengl module in qt6, will make merging easier. Change-Id: I0ad08510e6999a5d887d9197fe2cb0dc21919fb9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Make sure debug overlay is disabled by defaultMike Krus2020-01-271-0/+1
| | | | | | | | | | Change-Id: If86115308a403e7fa7950488a8ca6c8dac966c1e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add Profiling OverlayMike Krus2020-01-173-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Can be activated at adding a QDebugOverlay in the frame graph to identify which surface it should be renderer one (renders only once on first branch that contains such a node). Can be also activated on the forward renderer from Qt3DExtras. - Shows information about FPS and number of jobs/renderviews/commands/vertices/entities/geometries/textures... - Allows to toggle job and gl call tracing and open folder where trace files are stored - Windows to show and dump glinfo and renderview/command details to the console Change-Id: I286ff85760e8f8f0604a23458883ff22229bda94 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Fix deprecation handlingMike Krus2020-01-141-0/+1
|/ | | | | | Change-Id: If981333f7a3d78028d4f08c59867453d4192b955 Task-number: QTBUG-81058 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QDistanceFieldMaterial: Use a smaller Z offsetMartin Andersson2019-12-181-1/+1
| | | | | | | | The previous Z offset was too large because it sometimes caused the text to be placed on top of objects it was supposed to be under. Change-Id: I99bde5a93ea8c6443b1195d818075cebf3d082a4 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* QText2DEntity: Support display of empty stringsVolker Enderlein2019-12-131-8/+5
| | | | | | | | | | | | | The DistantFieldTextRenderer of a QText2DEntity was not properly updated for empty strings. The dereferencing of previous QGlyphRuns needs to be done before the number of DistantFieldTextRenderers is adjusted as a DistandFieldTextRenderer may be the parent of a QTextureAtlas that is referenced by a Glyph. Task-number: QTBUG-80569 Change-Id: I0dba8b749148bef088864dc7200ae0513965745a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QDistanceFieldMaterial: Don't scale rgb colors with distance field alphaMartin Andersson2019-12-092-2/+2
| | | | | | | | | | Scaling the rbg colors with the calculated distance field alpha value can result in faint text and different colors across the same text. These issues are most obvious when the text is small. Change-Id: Ia12e54e3f344cb918575739a15e519e34d67e0f1 Reviewed-by: Wieland Hagen <wieland.hagen@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix a crash in Qt3DWindow when the window has no heightJean-Michaël Celerier2019-11-261-1/+1
| | | | | Change-Id: Iaf09d3ada0db25794ec6e517301d054641cb41a0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Fix documentation warningsTopi Reinio2019-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | - Add (basic) documentation for Qt3DAnimation::QAnimationCallback. - Add missing namespace qualifiers for \class, \fn, \instantiates, \sa, and \property commands. - Remove linking to example file pages, as QDoc no longe treats them as linkable targets. - Fix function/QML method parameter documentation - Fix missing \qmlproperty types - Fix linking to QKeyEvent in QtGui. - Move Qt3DRender::Quick namespace documentation to where QDoc can see it. - Add enum documentation for Qt3DRender::QBlitFramebuffer::InterpolationMethod and Qt3DRender::QMesh::Status. - Other minor fixes This brings the current warning count to zero. Fixes: QTBUG-79822 Change-Id: I1154a7f9c34917a3f240e99da0e7a300be7d65a0 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QForwardRenderer: rename clearBuffers to buffersToClearPaul Lemire2019-10-072-9/+9
| | | | | Change-Id: Ifda1f6f69a6dc58d426dfddbd711620c185a30ab Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Clean up includesMike Krus2019-10-011-3/+0
| | | | | | | | | Remove include statements for classes that are no longer used. Makes it easier to find remaining use cases that need addressed before complete removal in Qt 6. Change-Id: I60529ba1929ad64b162d3847d5df47cde2a60dad Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-301-0/+4
|\ | | | | | | | | | | | | Conflicts: src/render/texture/qtexture.cpp Change-Id: Ibc0b8d87c172ea8fac521b2c85d2b2a42c5fc290
| * Reset input axis changes when enabling camera controllerMike Krus2019-09-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | When input axis are enabled or disable, we now reset the value to 0. And enabling or disabling the camera controller, we now do the same for the axis. This prevents residual movement when re-enabling the controller due to the asynchronous updates. Task-number: QTBUG-77996 Change-Id: I5ac016d5b708e1f8d8eaa996bbd28c00c0f05e79 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Update QRenderSettings to use direct syncPaul Lemire2019-09-251-2/+6
| | | | | | | | | | Change-Id: I610d06ac788f839653055a80f78c3f3be5ca68f8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QForwardRenderer: fix doc and add REVISION on clearBuffersPaul Lemire2019-09-192-1/+3
| | | | | | | | | | | | Task-number: QTBUG-77839 Change-Id: Idc33626c604a247044c9f682fac0f8dfc5ff3fcd Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-116-11/+12
|\| | | | | | | Change-Id: I4e73060c1941773efcc568f010f5b073ebb10d4a
| * Disable frame action when camera controller is disabledMike Krus2019-09-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | If a camera controller gets disabled while a movement is in progress, it may start moving indefinitely without any mouse events, or not respond to mouse events to stop the movement. Disabling the frame action will prevent this. Task-number: QTBUG-77996 Change-Id: I0120436a8ff9ff8b4306c41053aa494ac2ec3f42 Reviewed-by: Akihito Izawa <akihito.izawa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-315-10/+10
| |\ | | | | | | | | | Change-Id: Iae9a2903afd5da09cfd9288ff6cf74d7f069c83b
| | * Minor fixes for QSprite* classesMichael Brasser2019-08-303-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | * Fix off-by-one errors * Allow non-integer cell sizes Change-Id: I081cb5050a6805cbc9183fb2a7a1ee07b5594187 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| | * Update MetalRoughMaterial documentionMichael Brasser2019-08-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | These properties are not strongly typed. Change-Id: I02c8b793cc7b7f9e88a8b8598ea27efa93fa0468 Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * Add missing * for SkyboxEntity QML type documentationMats Honkamaa2019-08-261-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-77789 Change-Id: I3dcee435562c86ea9db98ee7c50a42d06bd576f9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | QDistanceFieldGlyphCache: make sure the arbiter of atlas can be setWang Chuan2019-08-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using QText2DEntity to display text, the node of QTextureAtlas will be create when traversing the node tree, and it will use root node as its parent node. However, since the children node of root node is being traversed in this moment, QTextureAtlas will not be traversed, that means the change arbiter won't be set, and the change in frontend cannot notify backend. [ChangeLog][Qt3DExtras][QDistanceFieldGlyphCache] make sure the change arbiter of atlas for QText2DEntity can be set when traversing node tree, and add new auto test for this. Fixes: QTBUG-77084 Change-Id: Iad09efe4376ba61f54624965118358a160be42a2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-311-0/+45
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/manual/manual.pro Change-Id: I15d497da84d3fe684c3a598831171d6aed7534ca
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-301-0/+45
| |\| | | | | | | | | | Change-Id: Id2885cdbb45f8aa701e218b6201f0a3732b7ef11
| | * Add QML documentation to QSkyboxEntityPaul Lemire2019-07-241-0/+45
| | | | | | | | | | | | | | | | | | Change-Id: Id82777c111827e8db8924d2d39b5844386344b69 Task-number: QTBUG-76767 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-236-0/+31
|\| | | | | | | | | | | Change-Id: I8c12142e4733d0d95fde3e673eb684c47363ff6f
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-166-0/+31
| |\| | | | | | | | | | Change-Id: I0f68ab1277617c32b1c31f29d8793d23d9909208
| | * Document an example of how textureScale might be usedMichael Brasser2019-07-156-0/+31
| | | | | | | | | | | | | | | Change-Id: Iead857526a06b104080ab843b26c49efc22f05cc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-111-1/+8
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Id34a7e40a1bd8f5bfbf87d3f3c06129bdfaebdf1