summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix documentation macro and other issuesTopi Reinio2016-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDoc doesn't allow a macro that expands into an empty string: src/core/nodes/qcomponent.cpp:189: warning: Unknown command '\TODO' Linking issues that are fixed by adding a dependency to Qt GUI: src/input/frontend/qkeyevent.cpp:121: warning: Can't link to 'QKeyEvent::nativeScanCode()' src/input/frontend/qkeyevent.cpp:141: warning: Can't link to 'QKeySequence::StandardKey' src/quick3d/quick3d/qquaternionanimation.cpp:42: warning: Can't link to 'QQuaternion' Other fixed warnings: src/input/frontend/qmousecontroller.cpp:54: warning: Unknown command '\intantiates' src/quick3d/quick3d/qquaternionanimation.cpp:42: warning: C++ class Qt3DCore::Quick::QQuaternionAnimation not found src/render/materialsystem/qparametermapping.cpp:85: warning: Undocumented enum item 'UniformBufferObject' Undocumented enum item 'ShaderStorageBufferObject' examples/qt3d/wireframe/doc/src/wireframe.qdoc:28: warning: Can't link to 'BasicCamera' Change-Id: Iea8f591bd09f0b8895dc568a48f2bfe80f2fe73d Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Fixed typo from documentationTitta Heikkala2016-01-251-1/+1
| | | | | Change-Id: Id88f042e3d411df0b7298b3fdff75a49e48150e2 Reviewed-by: Pasi Keränen <pasi.keranen@theqtcompany.com>
* Doc: Use 'Qt 3D' instead of Qt3D consistentlyTopi Reinio2016-01-253-11/+11
| | | | | Change-Id: I91c0d00c0116a05209239da399f4076316a51fc7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Added image for Audio Visualizer documentationTitta Heikkala2016-01-252-1/+1
| | | | | | | | Added image of running example to documentation of Audio Visualizer. Change-Id: I662106db0b960aac4eaff9c1cbf18b0223bb62aa Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com> Reviewed-by: Pasi Keränen <pasi.keranen@theqtcompany.com>
* Added Audio Visualizer exampleTitta Heikkala2016-01-2225-0/+1648
| | | | | | | | | | | | Example visualizes the magnitude of music played as animated bars. The music is played using media player. Implementation combines the use of Qt 3D rendering with Qt Quick 2D elements. Change-Id: I945d50d0dbd26151f274269649cca793a5ad4d27 Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Pasi Keränen <pasi.keranen@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: Removed Qt3DCollision namespace and module docsVenugopal Shivashankar2016-01-212-9/+8
| | | | | | | | Besides that, fixed a few qdoc warnings. Change-Id: Ibaf8fd6ffbb93f3f2bd73fa5fedf06e94f6ac2eb Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Added skeleton docs to geometry classesTomi Korpipää2016-01-201-1/+1
| | | | | | | Change-Id: I312b3f1eed1578899319cfc30b9bad143c5c467e Task-number: QTBUG-46037 Reviewed-by: Pasi Keränen <pasi.keranen@theqtcompany.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make the qgltf example use other assetsLaszlo Agocs2016-01-134-38/+42
| | | | | | | | | Wine is complex and not ideal for a getting started example. Instead, use three of the simpler scenes. Change-Id: I6859714e14c47c4907e85a48cde27d0ea5748ffa Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Disable the qgltf example to keep the CI runningLaszlo Agocs2016-01-111-1/+3
| | | | | Change-Id: Ic8383e39f368e293d5d97fe7bb78b435538249af Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use .qgltf extension for qgltf-generated glTF filesLaszlo Agocs2016-01-071-1/+1
| | | | | | | | | | Let's avoid future confusion by using a custom extension for the main JSON document. In case assimp gets upgraded to a future version supporting glTF files for example, confusion can arise due to the conflicting file extensions in the scene parser plugins. Change-Id: I370cc45cc399cae4f425d86574ccea9cd6c59d4f Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Exercise the new rotation properties in materialsLaszlo Agocs2015-12-151-1/+2
| | | | | Change-Id: I7e5ddf7b2effd676f177081ccc2440433df1bd22 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove initialize/shutdown from APIv5.6.0-beta1Kevin Ottens2015-12-1440-40/+0
| | | | | | | | Hiding them in QAspectEnginePrivate and calling them when needed from setRootEntity. Change-Id: I4c3dfb19d84ae90cc15bbff29a4abd0705bb61dc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Reduce specular reflectivity defaultsLaszlo Agocs2015-12-102-4/+1
| | | | | | | | 0.95 -> 0.01 to prevent eye-poppingly white specular highlights. Change-Id: I3e765bad13afe991053932e73cea13b95c950c1c Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Do lighting calculation in world spaceLaszlo Agocs2015-12-101-1/+4
| | | | | | | | | | | | | | | | As opposed to (mostly) camera space. Oops. While somewhat hidden with point lights, the problem became apparent with directional lights. Now that we have proper directional lights, change the default light, that is used when no light components are specified at all, from point to directional since this is cheaper and provides less surprises with arbitrary scenes. Also remove the duplicate phongalpha vertex shader in the process. Change-Id: I295660a1400b16b69e1516672e31794312ee48d1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for spotlightsLaszlo Agocs2015-12-094-5/+106
| | | | | Change-Id: I61a4e072c1a2e00cdbcee917aa557e56fb8cb7c0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Added parameters to signals and made setters Q_SLOTSTomi Korpipää2015-12-092-2/+3
| | | | | | Change-Id: Icec2f9f207221e35ffdeeb594bb9b4dc6ef890f1 Task-number: QTBUG-49797 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update simple-qml to use correct time deltaSean Harmer2015-12-071-10/+5
| | | | | Change-Id: Idc2d544d242c552033ad4826fad7a2fd48bf9672 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add sensitivity property to QMouseControllerSean Harmer2015-12-071-0/+28
| | | | | | | | | | | | | | The sensitivity is defined as the recipricol of the number of pixels the mouse is required to move to obtain the extreme axis value (-1 or +1). That is if you set it to 0.1 you need to move the mouse 10 pixels to get an axis value of magnitude 1. If it is 0.01, 100 pixels gives an axis value of magnitude 1. The user is responsible for applying any additional transformations in a suitable handler. Change-Id: I51cd28a17d4fc0b8461ac3e49efb26b2c66081b3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* simple-qml: CameraController implementation using the new Input APIPaul Lemire2015-12-075-3/+266
| | | | | Change-Id: I934a2b3b96db2be8d582059651338b69c4175320 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add a directional light to the exampleLaszlo Agocs2015-12-071-0/+13
| | | | | Change-Id: Iecf4d0fcb42e41e486d8cd6bf943c09878c7bbb2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid using the name Light in the examplesLaszlo Agocs2015-11-3013-11/+11
| | | | | | | To prevent colliding with the standard Qt 3D type. Change-Id: Ibf7b8b744dd23f1ced231e90486729be894a1be7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Enhance lights exampleLaszlo Agocs2015-11-301-3/+23
| | | | | | | | Two animated lights with the position of the lights represented as spheres. Change-Id: I5e337a4c2932e75dc4d676d4d9b9349249f6b227 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Lights phase 1: infrastructureLaszlo Agocs2015-11-265-1/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractLight becomes QLight and gets its own backend node. This way we can easily gather all lights for the scene and filter them when building render commands. Both the frontend and backend remain a subclass of (Q)ShaderData but will not be part of the ordinary ShaderData component list. This prevents mixing up ShaderDatas and Lights but allows reusing the same underlying infrastructure so that properties can automatically be transformed for example. It is worth noting that the position property for lights is now removed: the position is determined by the entity's (to which the light component belongs) position. A number of changes are made to ShaderData itself as backend subclassing with different managers is not straightforward. For now the distance between the rendered entity and the entity with the light component is calculated and lights will be chosen based on this distance. A framegraph node for controlling this will be added in future patches. No uniform setting or shader changes are included here. Task-number: QTBUG-48834 Change-Id: I43a6c5f9420d4254d798c558bd58680b2b09eceb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add a qgltf example.Laszlo Agocs2015-11-256-1/+236
| | | | | | | | | | | | This is like gltf but uses the original Collada asset and generates a glTF model at build time. Now that the qgltf rule is in qtbase we can freely use it in any examples. This does not have the limitations the gltf example has: this will function both with core profiles and ES. Change-Id: I9f04cf8b77337d397e1aecd1ffb22b7ce7e15ef7 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Fixed planets-qml exampleTomi Korpipää2015-11-243-116/+100
| | | | | | | Earth clouds are in the correct place again. Change-Id: Ic4ca6683d0196a66463d578d6d1587a762156750 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: Fix QDoc warnings and do further cleanupTopi Reinio2015-11-232-3/+3
| | | | | | | | | Fix the documentation issues that still remained broken after renaming the namespaces/QML modules. Do further cleanup and minor doc editing. Change-Id: Iff38c8c1b99e7f712dc3f9ad07ecd37a747b3a26 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Adapt examples to use new quaternion helpersSean Harmer2015-11-208-77/+26
| | | | | Change-Id: If9100fbc1870c09d90c9c1df102cf9c0503b96cb Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Adapt examples to use rotation property and quaternion helperSean Harmer2015-11-2017-166/+37
| | | | | | | | This covers all examples that can use the standard S, R, T order of transformations with a single rotation. Change-Id: Ief6741f9605742c545d8ef2be9bf8ab65164835d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Adapt examples to use no args form of Qt.matrix4x4()Sean Harmer2015-11-2017-129/+38
| | | | | Change-Id: If289d74601e2244d4175ba6b1ea3eb95df0bd50b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add a simple example showing how to use the new transformSean Harmer2015-11-208-1/+395
| | | | | | | | | Will be used to prove out the API. Perhaps we can extend this into a more complete example to show how the scene hierarchy leads to propagation of transformations. Change-Id: I06ed5fdd8f38043d1b4a296e9fa8a07c54a736af Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove QAbstractTransform and friendsSean Harmer2015-11-1711-39/+1
| | | | | | | | New simplified QTransform doesn't need these any longer. We now get a nice reduction in QObject count when dealing with transformations. Change-Id: I8ba8febada4ad1f05728aa848fb5e70a62028040 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove transforms property of QTransformSean Harmer2015-11-1791-1076/+1380
| | | | | | | | Compound transformations are now built up using QMatrix4x4 in both QML and C++. Updating examples accordingly. Change-Id: I03c9abf1f6cdd1b56226dc0e16a7ad5ce84516dd Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make BackToFront sorting workLaszlo Agocs2015-11-131-4/+14
| | | | | | Change-Id: I9f2442b49d825a36bef7036ee0893a17464bd73c Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Add resources_big for planets to make MSVC happyLaszlo Agocs2015-11-121-0/+1
| | | | | Change-Id: I5865e1250ad9e593d9abbcf33498d0c4a49e93e2 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Doc: Documentation clean upVenugopal Shivashankar2015-11-0628-32/+32
| | | | | | | | | | - Changed 'Qt3D' references to 'Qt 3D'. - Fixed incorrect \inqmlmodule instances. - Fixed broken \printuntil instances in the example docs. - Updated the namespace qualifier for a few class references. Change-Id: I250afe6843b10ed520f9ce5d7465203cc5c212c1 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Rename QOpenGLFilter to QGraphicsApiFilterAndy Nichols2015-11-0326-124/+124
| | | | | | | | | | | | | | | | | | | | | | This API change is part of an effort to remove anything specific to one graphics API (in this case OpenGL) from the public APIs. In addition to the name of the class being changed, the QGraphicsApiFilter::Api has been refactored to reference the Graphics API, rather than an OpenGL API. Now this list includes OpenGL, and OpenGLES, but could also include Vulkan, DirectX, or any other graphics rendering API we wish to support in the future. Right now the properties in this class are still reflective of the OpenGL APIs, and may need to be extended with other properties in the future for other rendering technologies. The QGraphicsApiFilter::Profile enum has also been changed to be more more clear. So for now there are enums NoProfile, CoreProfile, and CompatibilityProfile. Task-number:QTBUG-49078 Change-Id: Ib5f9c3b7adee5badec6bce8a12b23683eb43b4cb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* picking-qml example addedPaul Lemire2015-10-245-1/+258
| | | | | Change-Id: I6b0acff59f98e5daf51ea3cf3ab028728c2dd2ae Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename Renderer -> Render throughoutSean Harmer2015-10-19197-297/+297
| | | | | | | | This is for consistency between the C++ namespaces and QML imports and with the other aspects. Change-Id: I73392f138b4e519b12888f52530123e3d0ba445e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add an example showing instancing using VBO with divisor of 1Sean Harmer2015-10-199-1/+485
| | | | | Change-Id: I710df314902ca592c236e2120119718fc3b90c2c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Change import name of Qt3D Core from Qt3D 2.0 to Qt3D.Core 2.0Sean Harmer2015-10-1697-97/+97
| | | | | | | Makes the QML imports consistent with the C++ namespaces. Change-Id: I8c781a67a9010124bd22bb1fab16c4f1082fd962 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* custom-mesh-qml: examplePaul Lemire2015-10-145-1/+313
| | | | | | | Create a Mesh with buffers from QML with JS typed arrays Change-Id: I7f774b311c944a5ef2e2174b0699c430758559f1 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Move Qt3DCore into Qt3DCore namespaceSean Harmer2015-10-1368-215/+215
| | | | | | | Update other aspects, tests and examples accordingly. Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move Render aspect into the Qt3DRender namespaceSean Harmer2015-10-1365-299/+300
| | | | | | | Updated examples and tests accordingly. Change-Id: I8848a88472de2302aa072fa11f21ea934672b7e6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move Input aspect to Qt3DInput namespaceSean Harmer2015-10-1334-34/+34
| | | | | | | Also update examples accordingly. Change-Id: I8d19c3165899e4b7b791deb33098af4fb439f44a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Purge spurious execute permissions.Edward Welbourne2015-09-295-0/+0
| | | | | | | | Graphics, XML and text descriptions of objects don't need it. Change-Id: Ie01908ef848e09fcc4e08bc1f508496dbd85de29 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Fix clip-plane-qml on OS X and small tidy upSean Harmer2015-08-313-6/+4
| | | | | Change-Id: Ib1e6159a5fb44bfc167c63776bb878c73d043796 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix planets example on LinuxLaszlo Agocs2015-08-241-2/+0
| | | | | | | | Not sure why the version is only set for OS X - requesting 2.0 core profile is not ideal (as it's pretty wrong). Change-Id: Ic82b9835e3057fa79ac246eb6e41481970ac9cd9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* gltf example: show a note to explain the lack of material on non-ESLaszlo Agocs2015-08-201-0/+9
| | | | | Change-Id: Ic268445614a2d9d645029629747f5ef2e1aedc97 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Always Flip UV Coordinates in ObjloaderAndy Nichols2015-08-2015-0/+0
| | | | | | | | | | | | | | | | | | | Currently if you use a QMesh that has its geometry loaded from an obj file, the UV coordinates are such that the default loading behavior for textures is inversed over the Y axis, and now any textures provide must be preprocessed to be inversed over the Y axis as well. This is not consistent with the behavior of our scene loaders which allow for Textures to be loaded normally (right-side-up) and still get sampled correctly. This is because the scene loaders make sure to flip the UV coordinates when loading the asset. To be consistent, we now the UV coordinates when loading QMesh geometry with the Objloader. [ChangeLog][Qt3DRenderer][Objloader] UV Coordinates are now always flipped when loading QMesh Geometry from an obj source. Task-number: QTBUG-46815 Change-Id: I8c3ee5de5c8bbaf5967ef81059ed97eb85901ac2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Create proper Quick extended classes in scene loadersLaszlo Agocs2015-08-202-2/+125
| | | | | | | | | | | | This allows exploring the loaded subtrees from QML/Javascript code. The C++ classes are not suitable for this as they lack properties that involve QML specifics. The assimp (QML) example is updated to show how to do this (with the help of some C++ code). Say hello to the pulsating torus and the rotating monkey! Change-Id: I60401272105df5d72f4b7afebe26a3271e92f19e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>