Commit Graph

810 Commits

Author SHA1 Message Date
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
Mike Krus 939b9b4b75 Add support to move the camera so that the entire model is visible
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>
2017-05-23 17:31:00 +00:00
Robert Brock 4b3f368aba Replace undistributable files
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>
2017-05-16 10:02:58 +00:00
Määttä Antti 773402d482 Write docs for advanced custom material example
Also add it to highlighted items.

Task-number: QTBUG-60287
Change-Id: I87a6074bed171970b287c6cd934e6550d86e27e0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-05-10 04:13:12 +00:00
Paul Lemire b35237bfee Scene2D example: highlight that QtQuick is a Texture on a Mesh
Change-Id: Ibc78cc120ceed26c8521fa116e1794500b47c2dd
Task-number: QTBUG-60695
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-05-10 04:12:59 +00:00
Määttä Antti c0f12806a2 Call setSurfaceFormat after QQuiApplication instance initiation
The setSurfaceFormat function calls QOpenGLContext::openGLModuleType
function which can only be called after QQuiApplication istance is
initiated.

Task-number: QTBUG-60617
Change-Id: I7cbf48f325de9c3cbbb5d8addb78bf55ae1b5d07
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-05-09 09:00:59 +00:00
Sean Harmer 0ffdd1265b Add documentation for Scene2D example
Change-Id: I2d47b9224e4f26b342cd8a9bbe3c9c5a5e410dc1
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
2017-05-09 08:59:42 +00:00
Sean Harmer f516fab44e Add scene 2d example to showcase new feature
Change-Id: Ife2ead8fc2f0e0cb6dea18f8a74593847e25ff98
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
2017-05-09 08:59:38 +00:00
Määttä Antti 4baec34725 Add documentation for simplecustommaterial example
Task-number: QTBUG-60287
Change-Id: Id167ddd190b7aa5468bc6590c9f9f4fea234430b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-05-05 09:33:40 +00:00
Määttä Antti a6a4c3e4c1 Update multiviewport example image
Rendered content has changed so change the example image to reflect that.

Task-number: QTBUG-60287
Change-Id: I5d06ed980ffddfec150b7e3914a79fb4c597cf73
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-05-05 09:33:36 +00:00
Mike Krus 1d3ffb4cad Correct shader typo for rendering and fix shader selection
Task-number: QTBUG-60288
Change-Id: I320f787c3b245cc52df80d89c75f856aeacf649d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-05-03 20:24:34 +00:00
Paul Lemire 56d83515f6 advancedcustommaterial: request proper GL format
Change-Id: I9a4f1882805892248aa9f6a4cf8d83a49acaeb0b
Task-number: QTBUG-60288
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
2017-04-25 09:42:01 +00:00
Paul Lemire 85f2562428 simplecustommaterial: add GL2 shader variant
Change-Id: Ie55724be1872f98660093b0fd5cea54d7e0eae11
Task-number: QTBUG-60289
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
2017-04-25 09:41:57 +00:00
Sean Harmer f911323cfb Fix include capitalisation when using -no-pch
Change-Id: I05b9965f93f2a0e5e4c8a4e38e4f52dce1fa2f3d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-05 14:23:01 +00:00
Kai Koehne efcaf4dc9e Examples: Fix license headers
Use BSD for all sources, and FDL for all documentation files.

Change-Id: Ifce7284d10947b4948be6ecf44fe3ff8be30f7f7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-04-05 07:57:38 +00:00
Laszlo Agocs dd20abe1d1 Add a QQuickWidget-based Scene3D example
Shares the QML files with the scene3d example.

Task-number: QTBUG-52132
Change-Id: I076284b66a8dfdc3308171f11528851a7e20bbce
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-04-04 11:22:31 +00:00
Sean Harmer dcf35b5cc8 Improve documentation for shadowmap example
Change-Id: Ia71dcd616bc66e128250ae17a0ece7c9669209b7
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
2017-03-27 09:29:12 +00:00