summaryrefslogtreecommitdiffstats
path: root/examples/qt3d
Commit message (Collapse)AuthorAgeFilesLines
...
* Update AndroidManifest.xml to be compatible with Qt 5.14Eskil Abrahamsen Blomfeldt2019-10-251-5/+3
| | | | | | | | | | The bundled_in_lib and bundled_in_assets entries have been removed, so all manifests have to be updated to no longer refer to these. In addition, android-16 is no longer supported, so the minimum SDK versions have to be updated. Change-Id: Id01326df5522195647eb107b60ea7e637a950bb3 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* planets-qml: fix flickerring by using less precise scale unitPaul Lemire2019-10-232-22/+24
| | | | | | | | | | Essentially use 10^3 KM instead of KM so that we don't end up with too much precision in the positions which can then result in the camera flickering when the viewMatrix is computed for rendering Change-Id: Id2f878c2e1ccd22a2e72a3494d2e7f623f2b4eb6 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Scene3DView example: fix QML importsPaul Lemire2019-10-071-5/+5
| | | | | Change-Id: Ia46926faa46568a12dc02f7983477af6b395616d Reviewed-by: Mike Krus <mike.krus@kdab.com>
* QForwardRenderer: rename clearBuffers to buffersToClearPaul Lemire2019-10-071-1/+1
| | | | | Change-Id: Ifda1f6f69a6dc58d426dfddbd711620c185a30ab Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Introduce Scene3DViewPaul Lemire2019-08-278-1/+436
| | | | | | | | | | Allows to render several 3D scenes using a single Scene3D. To be used when you need multiple Scene3D instances. [ChangeLog] Introduce Scene3DView to render multiple distinct 3D scenes Change-Id: I5d51c5935218cc84c15d57def3703aa0d92040ba Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Scene3D: introduce compositingMode (FBO or Underlay)Paul Lemire2019-08-277-1/+4519
| | | | | | | | | | | | | | | | | | | | | | | | | The default compositing mode is FBO. One of the problematic aspects of Scene3D is its round trip through a FBO, which is moderately expensive on low-end hardware, although it makes it a fully fledged Qt Quick 2 item. If one wants MSAA then things are even worse, as an intermediate MS'ed FBO is needed, then resolving into the final one, whose color texture is then sampled. However, there's a significant use case for which these FBOs can be avoided, and that's the case of a 3D scene "below" other QQ2 content. In this setup, Qt3D can simply render to the screen, driven by QQ2; then QQ2 can draw on top. (It's the typical "underlay" scenario.) This can be enabled by setting the compositing mode to Underlay [ChangeLog] Scene3D add compositingMode property. Allows underlay rendering. Task-number: QTBUG-74977 Change-Id: I1ec5f5d60eab45835dbdb2596a7bf1b2ac3624e0 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Merge remote-tracking branch 'origin/5.13' into devPaul Lemire2019-06-0366-25093/+0
|\ | | | | | | | | | | | | | | Conflicts: src/render/renderers/opengl/renderer/renderer.cpp tests/auto/render/textures/tst_textures.cpp Change-Id: I4da0eafe7ddd4dd822c3dcb5f5fa826653a335b4
| * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-05-2966-25093/+0
| |\ | | | | | | | | | Change-Id: I9e9214906c5cda56d0bcc98678c77be69189699d
| | * Remove assets that are no longer usedDmitry Shachnev2019-03-2366-25093/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Files chest.qrc, houseplants.qrc and metalbarrel.qrc which used these assets were removed in commit 74c06c02f896c6aba408cfd0857d317378572736. Change-Id: Idd8d5b9baedf4c8f608aff6e3b5dbfe1a4f5a25e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Eradicate Q_FOREACH loops and mark the module cleanMarc Mutz2019-05-221-1/+2
|/ / | | | | | | | | | | | | | | | | | | The only noteworth change is where a loop around spy.events modified the container using takeFirst(). There was no reason to do so, so it was changed to use the loop variable instead of the result of taking. Change-Id: I02c62a7c2efc5d042c6e669fe5daddd7da7e85d2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* / Fix deprecation warnings about Qt3DRender::QBuffer::BufferTypeFriedemann Kleint2019-03-121-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the calls as 6158b4ae7cc88848b03d5d592a671de7113c4faf states that it no longer has any effect, fixing: gltfgeometryloader.cpp:333:18: warning: 'void Qt3DRender::QBuffer::setType(Qt3DRender::QBuffer::BufferType)' is deprecated [-Wdeprecated-declarations] gltfgeometryloader.cpp:371:54: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] basegeometryloader.cpp:155:39: warning: 'void Qt3DRender::QBuffer::setType(Qt3DRender::QBuffer::BufferType)' is deprecated [-Wdeprecated-declarations] basegeometryloader.cpp:202:46: warning: 'void Qt3DRender::QBuffer::setType(Qt3DRender::QBuffer::BufferType)' is deprecated [-Wdeprecated-declarations] instancebuffer.cpp:61:39: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is dep tst_qbuffer.cpp:79:96: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_qbuffer.cpp:85:100: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_qbuffer.cpp:128:109: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_qbuffer.cpp:132:57: warning: ‘void Qt3DRender::QBuffer::setType(Qt3DRender::QBuffer::BufferType)’ is deprecated [-Wdeprecated-declarations] tst_attribute.cpp:56:68: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_attribute.cpp:108:68: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_buffer.cpp:74:68: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_buffer.cpp:271:68: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_buffer.cpp:297:68: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_gltfplugins.cpp:519:95: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] tst_gltfplugins.cpp:574:95: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] tst_gltfplugins.cpp:967:83: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] tst_gltfplugins.cpp:969:82: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] tst_trianglesextractor.cpp:56:118: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] tst_trianglesextractor.cpp:57:116: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] tst_trianglesextractor.cpp:199:118: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] Change-Id: I6835598a1771a0ec3a0b080911fa4cada210a01a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Fix various documentation warningsTopi Reinio2018-11-071-1/+1
| | | | | Change-Id: I3eecd06bba9438b5aa472f3ba7ecaecdeda985e2 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Remove unused CameraController.qml from simple-qml exampleKai Koehne2018-10-023-314/+0
| | | | | Change-Id: Id76f8fc4d4701933e7744ff0dff837ec5e4bcc02 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Document third party asset 'miramar'Kai Koehne2018-09-241-0/+14
| | | | | | | | | | | | | The files got added in commit f49cabe35cbd. However, the original sources from the linked url are in .tga format, so I assume they got converted before importing. We should probably add a 'Modifications' entry to highlight such conversions in the future. https://opengameart.org/content/miramar-skybox categorises the license as CC-BY 3.0, but the upload was done not by the author. Change-Id: I312a871716104507434eb6d12a547c3752da51af Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Document third party asset 'wine'Kai Koehne2018-08-142-0/+48
| | | | | | | | | | The code was originally imported in commit 2a9a67d1b179, and then updated in to upstream version 0.8 in commit 473bd13ed37. LICENSE.md is from upstream repository. Change-Id: I20f97d46125abc4f1c7d54c52b891acc50336ac5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Doc: Add missing dots (qt3d)Paul Wicking2018-06-192-2/+2
| | | | | | Task-number: QTBUG-68933 Change-Id: I4226b8b9d70548b6921948c5ea47520f40f5df98 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.11.0' into 5.11Qt Forward Merge Bot2018-05-091-1/+0
|\ | | | | | | Change-Id: I666d4ca1ad39f81e41a9b47a8828d1689ff2b33e
| * Doc: Remove non-existent license file from qt_attribution.jsonTopi Reinio2018-04-241-1/+0
| | | | | | | | | | | | | | | | This caused the output to be malformed and conflict with other attribution docs. Change-Id: Id82a5e1780d14963e0905316827b4c1d9df04057 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Mark 3rd-party 'Jet Propulsion Laboratory Photojournal' as examples onlyKai Koehne2018-05-021-0/+1
| | | | | | | | | | Change-Id: I0b26333e80f73a5f873afc21df893ee596443b51 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Doc: Add basic documentation for Scene3D QML modulePaul Wicking2018-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | Adds Scene3D as QML module. Provides preliminary documentation for Scene3D QML type. Task-number: QTBUG-61651 Task-number: QTBUG-54816 Change-Id: I2811bb2165ca0adde574ddde70fa7185b3c03083 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Doc: Fix documentation warnings related to Clang QDoc parserTopi Reinio2018-04-203-6/+6
|/ | | | | | | | | | | | | | | | | | | | | 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>
* Add replacement materials examplev5.11.0-beta3Sean Harmer2018-04-0484-2345/+212299
| | | | | | | | | | | | | | All texture assets were made by KDAB under the CLA. The material "sphere" mesh is from Allegorithmic and published under the Creative Commons 4 license. See paragraph 1.2 of https://www.allegorithmic.com/legal/substance-share Task-number: QTBUG-61415 Change-Id: I23d61723bbac561e22e11fa57105b29148c01699 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 74c06c02f896c6aba408cfd0857d317378572736)
* Replace the toyplane mesh with one created by KDABSean Harmer2018-04-041-50969/+13227
| | | | | | | | Task-number: QTBUG-61415 Change-Id: I4557959c3c1068be5ef977d05a9e0443545ae919 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 07053f8424cbb3fffd89a9774bd5aba737d07f08)
* Merge branch '5.9' into 5.10Sean Harmer2018-01-254-55/+53
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/render/backend/cameralens.cpp src/render/backend/cameralens_p.h src/render/jobs/pickboundingvolumejob.cpp src/render/jobs/updatelevelofdetailjob.cpp Change-Id: I5433dde8ace462d11f037742d45f555c87235ffe
| * qardboard: Fix QardboardCamera following viewMatrix changesPaul Lemire2018-01-242-43/+30
| | | | | | | | | | | | | | | | Bonus: also remove the binding loop on the matrix property that was being reported. Change-Id: I2489a1f7ac5f65b4061ce069796d5afeab1811de Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * anaglyph-rendering: Fix StereoCamera following viewMatrix changesPaul Lemire2018-01-241-10/+14
| | | | | | | | | | Change-Id: I42d0091368914e0f3f8cb76c707d576227d7b5f2 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * multiviewport: Adapt SimpleCamera to viewMatrix changesPaul Lemire2018-01-241-2/+9
| | | | | | | | | | Change-Id: I3e276e8cd7d754905ed41a80ace19b72eb50175f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Fix 3d example appsLaurent Montel2018-01-161-3/+3
| | | | | | | | | | | | | | | | Remove extra QString(...) it's already a QString here. And use const'ref Change-Id: Ia58cd3046b3b13ec52e196d93cba00fc2384a083 Reviewed-by: Andy Maloney <asmaloney@gmail.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Fix controls example to look betterSean Harmer2017-11-171-2/+14
| | | | | | | | | | | | | | | | | | | | Phong lighting now takes alpha into account to set this to 1. Also add an explicit point light and properly use ambient and diffuse components. Change-Id: I252004c1a22bc3f43a527f79feef310b23279863 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Replace all phong variants with QDiffuseSpecularMaterialKevin Ottens2017-11-151-10/+15
| | | | | | | | | | | | | | | | | | | | This one reconfigures its graph layers and render states properly based on it properties. As such it covers all the features coming from the various phong materials we had in the past. That's why they are all marked as deprecated. Change-Id: I9a74639d4cff5170b496d475c8a74b1e4e163b03 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-311-2/+12
|\| | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/render/backend/renderview.cpp src/render/backend/renderview_p.h Change-Id: I6c1122632f2c481da31a63e3abd42b760d1ff211
| * Examples: Fix outdated BSD license headerKai Koehne2017-10-131-2/+12
| | | | | | | | | | | | | | Use new version with commercial exception. Change-Id: I09809579db277135edce1c6c1938ac3915600e11 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Fix scene2d logo colorMäättä Antti2017-10-191-2/+2
| | | | | | | | | | | | | | | | Swap ambient and diffuse colors in the logo material. Task-number: QTBUG-63821 Change-Id: Ieecd08ac3845d6864f1da84817bae63685a37612 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Doc: Fix link in Solar System Scope attribution documentationTopi Reinio2017-10-091-1/+1
| | | | | | | | | | Change-Id: Ib412be382830b13d65167c36a6c2d918878504fa Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Move phongFunction in its own include fileKevin Ottens2017-09-272-2/+2
| | | | | | | | | | | | | | | | | | Makes it cleaner overall since the light structs were shared with the metalrough includes and the gooch fragment shader but they didn't use the functions in there. Change-Id: I459ff0fc2d751a5be9296dc33dda0efcb06b917c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Wrap adsModel into phongFunctionKevin Ottens2017-09-252-18/+13
| | | | | | | | | | | | | | This way the use is more similar to the one for metal/rough. Change-Id: I143df910f43e29ef622f24bd97a23c90a2c8ef68 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Get rid of adsModelNormalMappedKevin Ottens2017-09-224-46/+30
| | | | | | | | | | | | | | | | | | | | | | | | All materials and examples are ported away from it. It was really not related to normal mapping at all, somehow it was an implementation of adsModel working in tangent space instead of world space. Now we got it all in world space, just like for the metal/rough implementation. Change-Id: I3346277ce9b91328d70d914b319ac25f947fff0e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add a simple example showing all phong variantsKevin Ottens2017-09-226-1/+322
| | | | | | | | | | Change-Id: Idcbb8a42658c6525f852e2f226ce816d779ee9c7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Fix planets-qml example for Qt 5.10Tomi Korpipaa2017-09-192-3/+8
| | | | | | | | | | | | Task-number: QTBUG-62321 Change-Id: I1df375c9a6a72049584eee118613bca72958e4f0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Extend skinned mesh example to show a simple model tooSean Harmer2017-08-103-0/+541
| | | | | | | | | | Change-Id: Ife2a5c1906e9a66858fa1bf5b8a5bcff3cb61feb Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add manual test for skinned mesh renderingSean Harmer2017-08-086-0/+2739
| | | | | | | | | | Change-Id: I904e3f41a44dd549334c884c2dc96ff6fb928a45 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devSean Harmer2017-07-1121-0/+0
|\ \
| * | Merge remote-tracking branch 'origin/5.9' into devAndy Nichols2017-07-1121-0/+0
| |\| | | | | | | | | | Change-Id: I4ceccd338a937a2ada231f568ed02c7a87bd6e80
| | * Remove misguided execute permissions from image filesEdward Welbourne2017-06-1421-0/+0
| | | | | | | | | | | | | | | Change-Id: I9079849c54deffbb15449d042ec0440e795c305b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Use Math.hypot() in preference to sqrt(a sum of squares)Edward Welbourne2017-07-071-1/+1
|/ / | | | | | | | | | | | | It's likely more accurate and may well be optimised, too. Change-Id: Iba38b80be16ca97a5f818e3dbc880a821cd9900a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Be (somewhat more) consistent about the value of piEdward Welbourne2017-06-141-1/+1
| | | | | | | | | | | | | | | | | | Use qmath.h's value for M_PI in shaders, rather than a value less precise than even float holds. Task-number: QTBUG-58083 Change-Id: I3cf30a0900216b1d7d6dc54d4c5676592ba503a0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add support to move the camera so that the entire model is visibleMike Krus2017-05-232-2/+21
|/ | | | | | | | | | | | | | Adds QCamera::viewAll(), QCamera::viewEntity() and QCamera::viewSphere() to move and rotate the camera so that the view center is the center of the sphere and the sphere fits inside the viewport Only works in perspective projection. Introduces a job to compute the bounding sphere of the scene excluding the camera. Change-Id: Id9d67787ea91c354009d5358d5db63a1c9480c70 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Replace undistributable filesRobert Brock2017-05-1650-52/+90
| | | | | | | | | | | The texture files used were from a third party that didn't explicitly allow their distribution. All of them have been replaced by textures from NASA and another third party that do allow their distribution and editing. Task-number: QTBUG-57543 Change-Id: I69f1309424bba029cdce08689ea8670ed32d44ae Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Write docs for advanced custom material exampleMäättä Antti2017-05-102-0/+84
| | | | | | | | Also add it to highlighted items. Task-number: QTBUG-60287 Change-Id: I87a6074bed171970b287c6cd934e6550d86e27e0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Scene2D example: highlight that QtQuick is a Texture on a MeshPaul Lemire2017-05-103-23/+40
| | | | | | Change-Id: Ibc78cc120ceed26c8521fa116e1794500b47c2dd Task-number: QTBUG-60695 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>