Commit Graph

826 Commits

Author SHA1 Message Date
Topi Reinio 0b5d01eeec Doc: Fix documentation warnings
- 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>
2019-11-13 11:29:48 +01:00
Eskil Abrahamsen Blomfeldt 8549dc8ce1 Update AndroidManifest.xml to be compatible with Qt 5.14
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>
2019-10-25 11:20:56 +02:00
Paul Lemire 3b649e3232 planets-qml: fix flickerring by using less precise scale unit
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>
2019-10-23 14:22:57 +02:00
Paul Lemire f29a8c502f Scene3DView example: fix QML imports
Change-Id: Ia46926faa46568a12dc02f7983477af6b395616d
Reviewed-by: Mike Krus <mike.krus@kdab.com>
2019-10-07 10:27:09 +02:00
Paul Lemire 69f3b01eb9 QForwardRenderer: rename clearBuffers to buffersToClear
Change-Id: Ifda1f6f69a6dc58d426dfddbd711620c185a30ab
Reviewed-by: Mike Krus <mike.krus@kdab.com>
2019-10-07 10:26:49 +02:00
Paul Lemire 91dc1e1a61 Introduce Scene3DView
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>
2019-08-27 17:08:23 +02:00
Paul Lemire 1fcbcf06da Scene3D: introduce compositingMode (FBO or Underlay)
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>
2019-08-27 12:10:09 +02:00
Paul Lemire 4eee1ab5a5 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/render/renderers/opengl/renderer/renderer.cpp
	tests/auto/render/textures/tst_textures.cpp

Change-Id: I4da0eafe7ddd4dd822c3dcb5f5fa826653a335b4
2019-06-03 12:29:52 +02:00
Liang Qi a4aa2f296b Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I9e9214906c5cda56d0bcc98678c77be69189699d
2019-05-29 11:40:59 +02:00
Marc Mutz 0570d73b61 Eradicate Q_FOREACH loops and mark the module clean
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>
2019-05-22 16:13:12 +02:00
Paul Lemire 06f41f15ab Merge remote-tracking branch 5.12 into 5.13
Change-Id: I42affdd02bddb5205b9f2455f0c5e5efbd414dd8
2019-04-26 07:14:12 +02:00
Liang Qi 0099270008 Fix the build with -no-gui
Task-number: QTBUG-74602
Change-Id: If9cf0795e887a0b3cdfed0a6f5e7798116ef137d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-04-09 12:50:59 +00:00
Dmitry Shachnev da99cc29a0 Remove assets that are no longer used
Files chest.qrc, houseplants.qrc and metalbarrel.qrc which used these
assets were removed in commit 74c06c02f8.

Change-Id: Idd8d5b9baedf4c8f608aff6e3b5dbfe1a4f5a25e
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
2019-03-23 12:34:46 +03:00
Friedemann Kleint 6f7ac29268 Fix deprecation warnings about Qt3DRender::QBuffer::BufferType
Remove the calls as 6158b4ae7c
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>
2019-03-12 11:22:25 +00:00
Topi Reinio d682d612ec Doc: Fix various documentation warnings
Change-Id: I3eecd06bba9438b5aa472f3ba7ecaecdeda985e2
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-11-07 12:50:21 +00:00
Kai Koehne 9b51fea01c Remove unused CameraController.qml from simple-qml example
Change-Id: Id76f8fc4d4701933e7744ff0dff837ec5e4bcc02
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2018-10-02 11:55:15 +00:00
Kai Koehne b830f43075 Document third party asset 'miramar'
The files got added in commit f49cabe35c. 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>
2018-09-24 07:09:53 +00:00
Kai Koehne aaa28f6802 Document third party asset 'wine'
The code was originally imported in commit 2a9a67d1b1, and then
updated in to upstream version 0.8 in commit 473bd13ed3.

LICENSE.md is from upstream repository.

Change-Id: I20f97d46125abc4f1c7d54c52b891acc50336ac5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2018-08-14 07:55:23 +00:00
Paul Wicking 809c753359 Doc: Add missing dots (qt3d)
Task-number: QTBUG-68933
Change-Id: I4226b8b9d70548b6921948c5ea47520f40f5df98
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-19 10:03:23 +00:00
Qt Forward Merge Bot 66feeb8de7 Merge remote-tracking branch 'origin/5.11.0' into 5.11
Change-Id: I666d4ca1ad39f81e41a9b47a8828d1689ff2b33e
2018-05-09 13:49:09 +02:00
Kai Koehne 974c904270 Mark 3rd-party 'Jet Propulsion Laboratory Photojournal' as examples only
Change-Id: I0b26333e80f73a5f873afc21df893ee596443b51
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2018-05-02 08:27:00 +00:00
Paul Wicking 988928b9d3 Doc: Add basic documentation for Scene3D QML module
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>
2018-04-26 12:08:43 +00:00
Topi Reinio 3e82b9bf12 Doc: Remove non-existent license file from qt_attribution.json
This caused the output to be malformed and conflict with other
attribution docs.

Change-Id: Id82a5e1780d14963e0905316827b4c1d9df04057
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2018-04-24 17:58:56 +00:00
Topi Reinio dcda92d309 Doc: Fix documentation warnings related to Clang QDoc parser
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>
2018-04-20 10:17:18 +00:00
Sean Harmer 2a260617b9 Add replacement materials example
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 74c06c02f8)
2018-04-04 13:31:46 +00:00
Sean Harmer 634529d899 Replace the toyplane mesh with one created by KDAB
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 07053f8424)
2018-04-04 13:31:30 +00:00
Sean Harmer 0851956b9b Merge branch '5.9' into 5.10
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
2018-01-25 14:44:35 +00:00
Paul Lemire 1d449ab502 qardboard: Fix QardboardCamera following viewMatrix changes
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>
2018-01-24 15:02:57 +00:00
Paul Lemire 42a8d30929 anaglyph-rendering: Fix StereoCamera following viewMatrix changes
Change-Id: I42d0091368914e0f3f8cb76c707d576227d7b5f2
Reviewed-by: Mike Krus <mike.krus@kdab.com>
2018-01-24 15:02:54 +00:00
Paul Lemire 1dc0ddf053 multiviewport: Adapt SimpleCamera to viewMatrix changes
Change-Id: I3e276e8cd7d754905ed41a80ace19b72eb50175f
Reviewed-by: Mike Krus <mike.krus@kdab.com>
2018-01-24 15:02:50 +00:00
Laurent Montel e9594f27cc Fix 3d example apps
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>
2018-01-16 10:38:57 +00:00
Sean Harmer b58719b222 Fix controls example to look better
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>
2017-11-17 13:31:06 +00:00
Kevin Ottens 100cc44725 Replace all phong variants with QDiffuseSpecularMaterial
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>
2017-11-15 10:51:28 +00:00
Liang Qi 4c32d8f662 Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	.qmake.conf
	src/render/backend/renderview.cpp
	src/render/backend/renderview_p.h

Change-Id: I6c1122632f2c481da31a63e3abd42b760d1ff211
2017-10-31 09:19:01 +01:00
Määttä Antti 44330f2e57 Fix scene2d logo color
Swap ambient and diffuse colors in the logo material.

Task-number: QTBUG-63821
Change-Id: Ieecd08ac3845d6864f1da84817bae63685a37612
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-10-19 14:37:38 +00:00
Kai Koehne d147ddb251 Examples: Fix outdated BSD license header
Use new version with commercial exception.

Change-Id: I09809579db277135edce1c6c1938ac3915600e11
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-10-13 19:26:54 +00:00
Topi Reinio beb2387dc9 Doc: Fix link in Solar System Scope attribution documentation
Change-Id: Ib412be382830b13d65167c36a6c2d918878504fa
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-10-09 10:51:34 +00:00
Kevin Ottens 67b76678d6 Move phongFunction in its own include file
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>
2017-09-27 18:10:55 +00:00
Kevin Ottens fb0c9421b1 Wrap adsModel into phongFunction
This way the use is more similar to the one for metal/rough.

Change-Id: I143df910f43e29ef622f24bd97a23c90a2c8ef68
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-09-25 13:43:37 +00:00
Kevin Ottens e67119b71d Get rid of adsModelNormalMapped
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>
2017-09-22 11:21:08 +00:00
Kevin Ottens 3d0abc640e Add a simple example showing all phong variants
Change-Id: Idcbb8a42658c6525f852e2f226ce816d779ee9c7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-09-22 08:35:54 +00:00
Tomi Korpipaa b23e177432 Fix planets-qml example for Qt 5.10
Task-number: QTBUG-62321
Change-Id: I1df375c9a6a72049584eee118613bca72958e4f0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-09-19 03:24:07 +00:00
Sean Harmer a6d0a8c1b9 Extend skinned mesh example to show a simple model too
Change-Id: Ife2a5c1906e9a66858fa1bf5b8a5bcff3cb61feb
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
2017-08-10 10:41:36 +00:00
Sean Harmer 60ea37949c Add manual test for skinned mesh rendering
Change-Id: I904e3f41a44dd549334c884c2dc96ff6fb928a45
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
2017-08-08 09:12:31 +00:00
Paul Lemire 718165fc24 Allow to disable aspects at configure time
This allows to remove dependencies and reduce deployment size when a given
aspect is not required.

Change-Id: I5aa90e4825b375cd446c47727aa11d03c40703c9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 06:24:27 +00:00
Sean Harmer 82a5efc7c9 Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev 2017-07-11 12:45:26 +00:00
Andy Nichols 2dd6aa0176 Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I4ceccd338a937a2ada231f568ed02c7a87bd6e80
2017-07-11 14:17:28 +02:00
Edward Welbourne 885c2c6aa3 Use Math.hypot() in preference to sqrt(a sum of squares)
It's likely more accurate and may well be optimised, too.

Change-Id: Iba38b80be16ca97a5f818e3dbc880a821cd9900a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-07-07 08:47:19 +00:00
Edward Welbourne 9c28631440 Remove misguided execute permissions from image files
Change-Id: I9079849c54deffbb15449d042ec0440e795c305b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-06-14 11:39:22 +00:00
Edward Welbourne 02e960493e Be (somewhat more) consistent about the value of pi
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>
2017-06-14 10:53:29 +00:00