summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Cleanup: remove QAbstractMesh/QMeshData/MeshDataManagerPaul Lemire2015-08-111-1/+0
| | | | | Change-Id: I1f13cea4cf864dcf985d1f487e195509de9006e7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* TessellatedQuadMesh converted to QGeometryRendererPaul Lemire2015-08-112-40/+32
| | | | | Change-Id: I72adb8b1221a06857d738ec19e6fd32e2c7886af Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* simple-cpp: uses the Qt3D::QWindowPaul Lemire2015-08-111-25/+5
| | | | | | | | Note: we don't have the blue clear color because it defaults to white with the default framegraph Change-Id: I993675105530d8f01b1b80b65bc37ec35e98426b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Deferred-renderer-cpp: use the QWindow classPaul Lemire2015-08-111-14/+7
| | | | | Change-Id: Iaf20fff6d8e89060876face4d0229f7fcea61f21 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* bigscene-instanced-qml example demonstrating instancingPaul Lemire2015-08-097-1/+298
| | | | | Change-Id: Ie556d85a837ebefbf1d6e053f7985bf791ffdcfb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for loading scenes from glTF 0.8 filesAndy Nichols2015-08-0819-721/+969
| | | | | | | | | | | | | | | This patch includes a new scene parser plugin which enables the loading of glTF files (using the 0.8 spec) into Qt3D scenes. The gltf example has been updated to work with the current APIs and the asset files it used have been updated to match the glTF 0.8 spec requrements. Previously an unused copy of the GLTF scene parser was located in render/io. It was being built, but not used as only plugin based sceneloaders were loaded by the renderer. Now it should be usable and always available. Change-Id: Ic2e31e2b63a871559aad9bad90ec2820988a1571 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* QAbstractAttribute: Type abstracted with an enumPaul Lemire2015-08-072-18/+25
| | | | | | | Also added a dataSize property to know the number of components per vertice (1 - 4) Change-Id: Iaa7cee2a53958ed2ec2f603f3ffc7971c027991d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add a property to Scene3D to control multisamplingLaszlo Agocs2015-08-071-0/+13
| | | | | Change-Id: I94ad9870a819af165fbbeae3a51db05c043d40ca Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* custom-mesh-cpp examplePaul Lemire2015-08-073-1/+265
| | | | | | | Demonstrate how to use the Buffer API to create a custom tetrahedron mesh. Change-Id: Ie30458c8a6dc3e2d8b1c6aef4a95a57f4cc63de9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* New Buffer API Frontend ClassesGiuseppe D'Angelo2015-08-071-3/+3
| | | | | | | | | | | | | | | - Switch QAbstractAttribute and QAbstractBuffer to QNode subclasses - Get rid of all shared pointer when dealing with these (needed to expose to QML and use the QObject ownership) - Introduce QGeometryRender, QGeometry, QAttributeProvider, QAttributeAggregator. A QMesh component now is: a QGeometryRenderer which specifies its QGeometry. The QGeometry refererences n attributes. Each attribute references a QAbstractBuffer. Change-Id: I49a10c11a605e5fe7c180af86a404f622e763f48 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* MouseInput API and example mockupRémi Benoit2015-08-035-1/+200
| | | | | | | | | | | | | | The meaning of exclusiveFocus is not set in stone for now. We know some kind of exclusive focus will be needed but defining it precisely will be done as the input aspect takes shape. QMouseController -> dispatch events to QMouseInput, specify the camera to be used to perform the picks. QMouseInput -> Component that offers a way to react to mouse events Q3DMouseEvent/Q3DWheelEvent -> Qt3D mapping of QMouseEvent/QWheelEvent Change-Id: I462bea2932d4bad6595d04a75ea1e0a67c7c8ba0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* examples: window.cpp request stencil bufferPaul Lemire2015-07-291-0/+1
| | | | | Change-Id: I03db64634c05aec91a60e7ca607e367039e4047b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* clip-planes-qml examplesPaul Lemire2015-07-2917-1/+1058
| | | | | | | | | | | | Demonstrates use of: -StencilOp / StencilTest -StateSet and nested StateSet -ClipPlane -Multiple render passes with different shaders -Use of layers Change-Id: I2d3f87e99e1fdbf9ed22e81838d6cc1744b6b8c1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Enhance assimp-cpp example with exploring the loaded scene treeLaszlo Agocs2015-07-281-4/+69
| | | | | | | | | Finding and possibly modifying the named parts of the loaded scene is essential in many cases. Therefore it is highly beneficial to have an example showing how to do this from C++. Change-Id: I3fefb80103b7e2f631464460c95067d414e4819f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Functors: remove dynamic_castPaul Lemire2015-07-281-1/+3
| | | | | | | | | | | | | | | Introduce a QAbstractFunctor class which QAbstractMeshFunctor and QTextureDataFunctor subclass Make all QAbstractFunctor subclasses implement an id() function (using QT3D_FUNCTOR(Class)). Use this id to compare to other QAbstractMeshFunctor and eventually static_cast into right type if possible using the functor_cast member function. Change-Id: Iface956e6cd818cbef204d8fa7bf2bc23c6ffa3f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* loader-qml: Added materials and animationsPaul Lemire2015-07-253-14/+68
| | | | | | | | Helps ensure that property updates and complex nodes such as Materials are properly created and updated dynamically Change-Id: I126f971d2c94bcc45e368e9b2a15d0d1e7d456d4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Improve the keyboardinput-qml exampleSean Harmer2015-07-244-97/+93
| | | | | Change-Id: I54e08df02a85a0019b53b9adbb3bc718709b1eb7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add scene3d-loader examplePaul Lemire2015-07-238-1/+433
| | | | | Change-Id: I3f7cfc5459dbb07e395a15920cd80786689cb2e1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Scene3D: make background transparentPaul Lemire2015-07-201-1/+1
| | | | | | | Will help spot regressions on the Scene3DItem Change-Id: I603b2950382b1a65dbc4cb36af1c140e85b67679 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* transparency-qml-scene3d: added precision to alpha variableMichael Dippold2015-07-171-1/+1
| | | | | | | | | Shader failed to compile on some android targets without the precision defined. Change-Id: I1953f62594dc931f40186963add1ff8df6867975 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* transparency-qml: added precision to alpha variableMichael Dippold2015-07-171-1/+1
| | | | | | | | Shader failed to compile on some android targets without the precision defined. Change-Id: Ie46a8a42acda5394f503b2445003cb96b2b1d59d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* gooch-qml: Add the input aspect, needed for the cameraPaul Lemire2015-07-122-1/+3
| | | | | Change-Id: I35df4232d327b7fc816642b968c0590fa34c9544 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add transparency-qml-scene3dPaul Lemire2015-07-128-1/+367
| | | | | | | | Does the same thing as transparency-qml, allows to verify there's nothing wrong with QtQuick 2 premultiplied alpha Change-Id: Ia85a9759eace636e13d2e1b4a0e7f65fb96171e1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add pure Qt3D simple transparency examplePaul Lemire2015-07-127-1/+328
| | | | | Change-Id: Iddf70866fb99e4e4b92e365a55cd84428eeaa1e0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Improve Controls examplePaul Lemire2015-07-121-12/+9
| | | | | Change-Id: I5e55597a165cac4e55782c92aae07b3e6848d061 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add check for android, ios and winrt compatibilityMika Salmela2015-07-072-0/+8
| | | | | | | | | | Some examples can be opened from creator's welcome screen and then we need to have also check on example's own pro file for android, ios and winrt. The basicshapes and assimp uses widgets so those won't work properly on these devices. Give a warning when trying to build. Change-Id: Id05e306813c38b1e8704d5dd7af17f5690ea08d6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Don't saturate with too much ambientSean Harmer2015-07-041-1/+1
| | | | | Change-Id: I7a400f75a945b16d78da885ffc576c82f836a076 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add gooch material and exampleSean Harmer2015-07-046-1/+217
| | | | | | | Edge inking will come later. So many techniques to choose from. Change-Id: Ibbea66c09c158bebba5d8efaf08d18417fa9b161 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>