summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Move the examples under a qt3d subdirLaszlo Agocs2015-03-04315-42/+44
| | | | | | | | Modules cannot have their examples in the top-level examples directory because in the pre-built packages all modules' examples are merged together. Change-Id: I80fdbb8f1ec6f3d8fd793e4d856e705000237127 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix: remove QByteArrayLiteral used when setting SceneChange property namesPaul Lemire2015-02-281-2/+2
| | | | | | | | This was probably forgotten when the property name was changed fron QByteArray to char *. Change-Id: Idd6a988703a241519b3aba7b1d127adae5e1375e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Added NodeInstantiatorSean Harmer2015-02-285-43/+88
| | | | | | | | | Hopefully in the long term we can make the renderer smart enough that it can automatically use instancing to render such things. Change-Id: I9f5cfabeea11f5e6b925d5ad2466afa8e601e6f8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix scene path in assimp examplesPaul Lemire2015-02-262-2/+2
| | | | | | Change-Id: Icf48692501df3647d05d9a5ad9c4017bde650b87 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Remove incomplete bullet and OpenAL aspectsSean Harmer2015-02-1911-708/+0
| | | | | | | This can be reverted following the merge from dev -> 5.5. Change-Id: I7b85e64aa91d9ed81e3ef4d866e531056314d72e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make shadow mapping functional on ES 3Laszlo Agocs2015-02-186-0/+292
| | | | | | | | | To preserve our sanity we will only support ES 3.x, not 2.0 + GL_OES_depth_texture + EXT_shadow_samplers. This way we can provide version 300 es shaders and do not have to introduce yet another filter and technique. Change-Id: Ib5c826d6540b4848f0cb4629e5311150169a9697 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* playground-qml now properly showing ShaderData/UBOPaul Lemire2015-02-182-36/+11
| | | | | Change-Id: I939927270786773522ca7a327195cc504dccc412 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix texture sampling callsLaszlo Agocs2015-02-144-10/+10
| | | | | | | | texture2D() is not available in core profiles, although some drivers accept it. Instead, use texture() in >=130 shaders. Change-Id: I555d7b1fb7229db1fdb7257bd23a3a38d0087d88 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use Qt wrappers for math functionsLaszlo Agocs2015-02-143-5/+5
| | | | | | | | | Make sure it builds on obscure platforms like WinCE. Functions like cosf live in some unexpected headers there. Best is to avoid the issue altogether by using the qmath functions. Change-Id: I3cbf0f811aef36997ad38db431426e9eb582198b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid instance names in uniform blocksLaszlo Agocs2015-02-132-9/+9
| | | | | | | | Version 140 (OpenGL 3.1) does not support the namespacing features yet. Instance names are introduced only in 150 (OpenGL 3.2). Change-Id: I3917093113beff6049c25c3282c13062d220700b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make scene parsers operate on URLs instead of raw filenamesLaszlo Agocs2015-02-132-2/+2
| | | | | | | | This way they are compatible with how mesh and texture source URLs are handled. Change-Id: Ifeee504fd3f5957d23f5cade92a73663488bdaf9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Copyright header change.Mika Salmela2015-02-09135-2565/+1890
| | | | | | | | As for preparation for Qt5.5 release the copyright header is updated to correspond the current license requirements. Change-Id: I36632918b66f455539453b42c369689fb11298ec Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add GL(ES) 2 support to the Skybox exampleLaszlo Agocs2015-02-091-0/+58
| | | | | | Change-Id: I5baf9e45cb9f16c6607948e5dce670e70edcdd3d Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Skybox/QWrapMode: update doc and remove r wrap mode on SkyboxPaul Lemire2015-02-081-1/+0
| | | | | Change-Id: If06f2943fda92512437768a749055968d7c9af04 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Skybox example updated to use new texture APIPaul Lemire2015-02-082-5/+14
| | | | | Change-Id: Ibe21febfee752e7708b909b5411e35f75ebfb9e5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* materials-cpp updated to use new Texture APIPaul Lemire2015-02-085-88/+60
| | | | | Change-Id: I36d48c6eba94d20c7accc76e684f8ba36f2a53cc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make ctor of QAbstractTextureProvider protectedPaul Lemire2015-02-081-1/+1
| | | | | | | That enforces to use one of the subclasses. Change-Id: Idba7300ed322954ba6866c4a262ad4ee74c024e5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Moved QAbstractTextureProvider/QWrapMode to proper filesPaul Lemire2015-02-083-3/+3
| | | | | | | This will avoid qtexture.h/cpp becoming to large. Change-Id: I5965b6f164951d1110145defe337fab76fea2b94 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QTexture renamed to QAbstractTextureProviderPaul Lemire2015-02-086-46/+46
| | | | | | | | | | This is done prior to the whole texture API refactoring. Doc was also added, might need improvement later on but a base is present at least. Change-Id: I75589f14dfbfba7bc4250b2e0960670e020ed38a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Skybox examplePaul Lemire2015-02-0821-2/+341
| | | | | | | | | Demonstrate the use of a CubeMapTexture Note: cubemap textures added to the example resources assets as webp Change-Id: I68256c204c3ccde7a4cc744238135dbd9b317198 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove 4.5 core requirement from scene3d exampleLaszlo Agocs2015-02-041-4/+0
| | | | | | | | It should work with any version, including ES2. Change-Id: Ia13a84f85d2f2f1d3518b516cb221d240fdaa80c Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix example building on MinGWGiuseppe D'Angelo2015-01-261-3/+7
| | | | | | | In general make the code slightly more robust. Change-Id: I54b3a6c91d0cf086e0bd804f95a2286d2ec00452 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Allow to control the aspects used by a Scene3DKevin Ottens2015-01-252-1/+2
| | | | | Change-Id: I5fb20950cb5f829ab6beb42c1f9d97b6ae94c884 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* material-qml: updated to use sortingPaul Lemire2015-01-243-2/+8
| | | | | Change-Id: I134a0ed43473d9b04f6cc049e6bbe60bd059cb02 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderCommand sortingPaul Lemire2015-01-241-0/+0
| | | | | | | | | | Builds a Key of 3 values (shader, state change cost, depth) Uses the program DNA for the shader comparison. The key is configured by the FrameGraph QSortMethod/QSortCriterion nodes. Change-Id: I9fa57ac456b81daac2cc4673446778da1948ef92 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* playground-qml: renamed ForwardRenderer to not conflict default FrameGraphPaul Lemire2015-01-244-3/+3
| | | | | Change-Id: Ie91682eb9bdebb4fc95a31c1ec96da39f8a16eba Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* deferred-renderer-qml: updated to use more lightsPaul Lemire2015-01-243-17/+82
| | | | | Change-Id: I7bbff1aed73389909881f08d82d344c1f7b03576 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* enabled-qml: use enabled flag on FrameGraph nodesPaul Lemire2015-01-242-68/+110
| | | | | Change-Id: Ifd76233a38b07ee82bb0dca2cd69746144711c11 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* enabled-qml: Example to test the enabled property on componentsPaul Lemire2015-01-245-1/+247
| | | | | | | | | | | | | | | Tested on: * Layer * Material * Mesh * Transform * CameraLens This example will be completed later on to test the enabled flag on FrameGraph node. Change-Id: Ia128ea5e5c8624ef2b11d82bd541a635f349727f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Have Scene3DItem deal with input eventsKevin Ottens2015-01-232-0/+5
| | | | | Change-Id: I8b7637d80e3b9b2ad1b140f32a5e824d2547a936 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* The input aspect don't need QWindow anymoreKevin Ottens2015-01-2325-25/+25
| | | | | | | | | This aspect doesn't need to depend on a QWindow, any QObject can do as long as we can have an event filter on it and we see input events on it. Rename the whole concept to "view" in the process. Change-Id: Idce2fcc37c5679fe0f7915d27793685167dd59a6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove the now useless QuickWindowKevin Ottens2015-01-2317-34/+51
| | | | | Change-Id: I714cf941230fdd83f0de37125bf44b4888662b25 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move CameraController in the input aspectKevin Ottens2015-01-2344-32/+90
| | | | | | | | | | | | | | | With this move it also becomes a private class. As a result I had to touch all the examples as you won't get camera navigation anymore if the input aspect is not registered. Quick3DConfiguration doesn't depend on the QuickWindow singleton hack anymore, it tries to get back to the aspects and set the camera on the ones having a corresponding property. It also mostly empties Window and QuickWindow. Change-Id: Ife1644bd338e51929bad1e99089bd5e4c68ebc68 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix for wave examplePaul Lemire2015-01-204-3/+3
| | | | | | | | There was a conflict between ForwardRenderer which is a default FrameGrapg and the FrameGraph in ForwardRenderer.qml Change-Id: I4b7dd9664b100858ce3b5f10d9d02eca6a8f5f52 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* material-qml: correct scale values for plantsPaul Lemire2015-01-191-2/+2
| | | | | Change-Id: Iee7e88dd9320a875a8986d89dfc5ecc512a389ff Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* torus-cpp: use QForwardRendererPaul Lemire2015-01-181-17/+5
| | | | | Change-Id: I527c6fb455ca3e260f47e7414bf606c5e5a2c061 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* simple-cpp: use QForwardRendererPaul Lemire2015-01-181-18/+6
| | | | | Change-Id: Iadf8de6a91fe8e00d0847ffb4bedeec5a44642b4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* bigscene-cpp: use QForwardRendererPaul Lemire2015-01-181-17/+5
| | | | | Change-Id: I7638fbfbff4fe472fd4fd4b85fb2fb230159614b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* cylinder-cpp: use QForwardRendererPaul Lemire2015-01-181-15/+5
| | | | | Change-Id: I2e2ae2fee85c6abd6825e1e7e97efcc87b038c42 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* dynamicscene-cpp: use QForwardRendererPaul Lemire2015-01-181-2/+6
| | | | | Change-Id: I4035532db5633dda8ae8d53baf08324e0c68bc96 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* materials-cpp: use the default QForwardRendererPaul Lemire2015-01-184-134/+6
| | | | | Change-Id: Ic0aad40da195a89198a1e43fd80a23ff785491db Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* use the default ForwardRenderer in the examplesPaul Lemire2015-01-1826-482/+15
| | | | | Change-Id: Iade146d9d63ba9d8b33953467e67d5864d0469b9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* deferred-renderer-cpp: Use ShaderData to fill lights for GL2 TechniquePaul Lemire2015-01-185-6/+12
| | | | | | | | | | | To test OpenGL2: comment addTechnique(m_gl3Technique); in finaleffect.cpp Note: also fixed the FrameGraph tree, the draw screen quad was executed first and then the fill GBUffer, it still worked as the screen quad reused the GBuffer from the previous frame. Change-Id: I52c0c11017e057a5042804ad49ccd1a3baf1d857 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* deferred-renderer-qml: Use ShaderData to fill lights for GL2 TechniquePaul Lemire2015-01-182-12/+23
| | | | | | | To test OpenGL 2: comment the OpenGL 3.1 technique in FinalEffect Change-Id: I475e0881a8954bf652fbc0796103ddbb74f62474 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* deferred-renderer-cpp: show something on screenPaul Lemire2015-01-185-5/+145
| | | | | | | | | | | Created subclass of QShaderData to hold all lights for the scene. GL3 shader updated accordingly. For GL2/ES2 to work, QShaderData uniform struct support needs to be implemented Change-Id: I5560eac23234e53feba18b607276159989700141 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* deferred-renderer-qml shows something againPaul Lemire2015-01-182-11/+26
| | | | | | | | | | Render the lights from a UBO defined in a ShaderData Note: Applies to GL 3 only, need to implement struct support for QShaderData for older platforms to work Change-Id: I6119bf85535075655e522544612dcc7c43daec35 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* playground-qml updated to test new cases with QShaderDataPaul Lemire2015-01-182-18/+35
| | | | | Change-Id: I2678c7022461b578776854d00a508657b2c29f9b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add a Scene3D item to wrap Qt3D scenes in QQ2Kevin Ottens2015-01-186-1/+337
| | | | | | | | Comes with an example to try the embedding and check that transformations work on the Scene3D element. Change-Id: I93b4690b7fac0c9c90f8a89c53ad6b83aa2c89a6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Port the shadow map example to the new featuresGiuseppe D'Angelo2015-01-173-20/+18
| | | | | Change-Id: Ic835c341d57c570e8466e3ebc307c38faad0743f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Shadow map example: temporary fix for asset loadingGiuseppe D'Angelo2015-01-162-2/+2
| | | | | | Change-Id: I37218ad0bf5225873ebc2d0304ebc0c22eba94a5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>