summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QNodeCommand: Fix API review commentswip/vrMike Krus2017-05-293-1/+6
| | | | | | | | | | Implement QNodeCommandPrivate dtor out-of-line and mark the (Private, NodeId) ctor explicit. Amends 44420de26b3ff7999ef2a932c2cae058d794b155. Change-Id: Ic234e123c64a9e8bb2eef480dec9e91f0ceba585 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add support for line pickingMike Krus2017-05-2617-23/+561
| | | | | | | | | | | | | | | PickingSettings can ask to get line as well as triangle picks. Introduces a radius value to compensate for numerical precision in ray-segment intersections. Introduces QPickLineEvent with the details about the picking. Job will perform line picking if appropriate. Hit encode the type of picking and this is used to generate the right type of event. Task-number: QTBUG-58071 Change-Id: I834e6cc08044a8cfb28bba7443034e05267aedbf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Refactor job to prepare for line and point pickingMike Krus2017-05-269-110/+125
| | | | | | | | | | | | | This moves much of the job utils into private code, simplifies the various class types, clarifies names to avoid clashes and simplifies some APIs. Introduces changes in headers requiring extra includes in various files. Task-number: QTBUG-58071 Change-Id: I20a8251abcef140d9d71b372a66282e242a21ad2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Minimize header dependenciesMike Krus2017-05-262-2/+4
| | | | | | | | | Job header are included in renderer, changes trigger large rebuilds. Minimizing the amount of includes used only by internal job operations. Change-Id: Ie4d575f1cb2d0ca97452f469afdb47f88250dc00 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for iterating on linesMike Krus2017-05-266-1/+1292
| | | | | | | | | | Provides base class for iterating on segments of line based geometry. Points are passed as floats along with their index and the index of the segment. Task-number: QTBUG-58071 Change-Id: I4ad08af60265d3df3547b3cb6e0dc02d89bca2f9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Refactor triangle visitor to make way for edge visitorMike Krus2017-05-264-136/+233
| | | | | | | | | | Moves some of the visitor functions that control primitive introspection to a separate file for reuse later. Cleaned up some of the variable and method names. Also removed use of deprecated API in tests. Change-Id: Ic7e9f74f6ec5603fb92d967775ca74986d9875b8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support to move the camera so that the entire model is visibleMike Krus2017-05-2316-7/+493
| | | | | | | | | | | | | | 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>
* Camera: add pointer back to aspectMike Krus2017-05-233-1/+52
| | | | | | | Needed later to submit one shot jobs Change-Id: I9da9a56c9889e15582fd56d66c928c8ed8ca329e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add QNodeCommandMike Krus2017-05-229-2/+391
| | | | | | | | | | | Adding QNodeCommand to send commands between a node and it’s backend, and back. Contains a command name and data as a QVariant. Also has an integer id so replies can be related to the original command. Change-Id: Iaf6bf8959df4cea94c347669958ee90bd44965cc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for single shot jobsMike Krus2017-05-223-1/+23
| | | | | | | | QAbstractAspect includes a list of jobs that will only be run once. The list is added in jobsToExecute and then cleared. Change-Id: I5849c643a06d8e4e81bbc55d610851de05087934 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for remote content in SceneLoaderMike Krus2017-05-219-38/+180
| | | | | | Task-number: QTBUG-57614 Change-Id: I687a9620865f5849aaba2aadb5a9c3746afb0b53 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support to load data from memory for scene loadersMike Krus2017-05-215-29/+84
| | | | | Change-Id: I666897ae54441a226fa6f8a7f8cdfc1a576f3494 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge branch '5.9' into devSean Harmer2017-05-21244-1785/+10989
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/qscene.cpp src/plugins/sceneparsers/gltf/gltfimporter.cpp src/plugins/sceneparsers/gltfexport/gltfexporter.cpp src/render/texture/gltexture.cpp Change-Id: I7bde0fc0177eae252fef01cc43725fcf69c13a80
| * Merge branch '5.9.0' into 5.9Sean Harmer2017-05-20169-1001/+9025
| |\ | | | | | | | | | Change-Id: Icb23dcb19d312559f5f4a71bde3dc26bf4a19408
| | * Don't use seamless cubemap on GL <3.2Sean Harmer2017-05-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise it just floods with qWarning messages. This is only available on GL 3.2 or newer so only try it there. Task-number: QTBUG-60180 Change-Id: I8681c900ad5febc28a671305fa8c5d2e81662cab Reviewed-by: Oleg Evseev <ev.mipt@gmail.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * Ensure normal vector is normalized following interpolationSean Harmer2017-05-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes "per-vertex" appearance of specular highlight in QMetalRoughMaterial. Task-number: QTBUG-60181 Change-Id: I03fd54ff997242fd987174d453642bd00076e26f Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| | * Match the Blinn-Phong specular power to be consistent with IBLSean Harmer2017-05-162-61/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the same specular power as a function of roughness as used by Blinn-Phong in other engines and in Lys which is used to generate the image based lighting specular maps. During testing, noticed the specular highlight from punctual lights seems more like it's per-vertex based. Task-number: QTBUG-60181 Change-Id: Id379d59a5e1295c2cdf9bdabf246b7e0c0a9c499 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| | * Improve the roughness to mip level mappingSean Harmer2017-05-162-20/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We follow the approach used by Lys as detailed at: https://docs.knaldtech.com/doku.php?id=specular_lys Along with the perceptual linear roughness remapping as used by: UE4: http://graphicrants.blogspot.co.uk/2013/08/specular-brdf-reference.html Frostbite: http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr.pdf We should also check the punctual light implementation of Blinn Phong specular power based on the above references. Task-number: QTBUG-60181 Change-Id: I8ca6116d8d7847a8f200f366dcd11f693810608e Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| | * Renderer: prevent crash in case texture failed to be builtPaul Lemire2017-05-161-0/+2
| | | | | | | | | | | | | | | | | | | | | This can occur if a TextureLoader fails to load (wrong path, access denied ...) Change-Id: I55b62312db79db3980146bb17cbadbe5c66d7a48 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Replace undistributable filesRobert Brock2017-05-1650-52/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Fix speed regressions in ES2 shadersOleg Evseev2017-05-161-173/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GLSL ES specification (up to at least 3.0) does not mandate support of dynamic indexing of uniform block arrays. For that reason loops in ES2 shaders were unrolled by calling separate functions, but it had leaded to rendering speed regressions. This patch reverts loops unrolling using separate functions and replaces dynamic indexing in place instead. Task-number: QTBUG-60183 Task-number: QTBUG-54994 Change-Id: Ieb036f442922de312b2941a0b8c511c0b4b3ec5a Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Oleg Evseev <ev.mipt@gmail.com>
| | * Fix qmlClearTypeRegistrations for Qt 3DMäättä Antti2017-05-124-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unregister valueTypeProvider in qtquick_global.cpp to prevent multiple registrations. The Quick3DColorProvider doesn't seem to cause problems so leave as it is. Task-number: QTBUG-56546 Change-Id: I79139d8e8ab80458e72633dd97e15dbf108388e4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Add changes file for 5.9.0Jani Heikkinen2017-05-121-0/+81
| | | | | | | | | | | | | | | | | | | | | Listing important changes and bug-fixes. Change-Id: I638bf3914bff7df015e6e842ef0f564b7b4180bf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Remove duplicate subdirs target that slipped inSean Harmer2017-05-121-2/+1
| | | | | | | | | | | | | | | Change-Id: Ia2c5a7ae98d5a3cbf7c0981caeccaa4245a57707 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
| | * Fix SC breakSean Harmer2017-05-121-0/+8
| | | | | | | | | | | | | | | Change-Id: If9bd9142dcfceedb8baefe0c8229e7eb7e1e6e50 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Write docs for advanced custom material exampleMäättä Antti2017-05-103-3/+90
| | | | | | | | | | | | | | | | | | | | | | | | Also add it to highlighted items. Task-number: QTBUG-60287 Change-Id: I87a6074bed171970b287c6cd934e6550d86e27e0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Scene2D example: highlight that QtQuick is a Texture on a MeshPaul Lemire2017-05-103-23/+40
| | | | | | | | | | | | | | | | | | Change-Id: Ibc78cc120ceed26c8521fa116e1794500b47c2dd Task-number: QTBUG-60695 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * QNode: setParent create creation change only when neededPaul Lemire2017-05-104-4/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two cases need to be handled by setParent: 1) Parent already has a backend node and receives a new child -> in which case we need to send the creation event to the backend 2) Parent was created in the frontend, but has no backend (delayed notification sending because a ctor can't call a virtual) -> in that case, when adding a child and setting its parent we shouldn't be sending the creation change. We rather let that be handled when the creation change for the parent is requested Change-Id: I434c7d4e6af785c0314ac6538dc689992d90ed0c Task-number: QTBUG-60612 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Oleg Evseev <ev.mipt@gmail.com>
| | * Call setSurfaceFormat after QQuiApplication instance initiationMäättä Antti2017-05-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Improve QScene2D documentationsMäättä Antti2017-05-091-6/+91
| | | | | | | | | | | | | | | | | | | | | | | | Add missing docs and add usage instructions for the Qml type. Change-Id: Id52025f0022bbaad56b0dbf4aa8ed33575568ceb Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Add quick3d class for VertexBlendAnimationAntti Määttä2017-05-095-3/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the missing class for VertexBlendAnimation so that it can be used from qml. Task-number: QTBUG-60618 Change-Id: If47dccf5e44d0158053ca3b9122fcef91d73ea93 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Merge "Merge remote-tracking branch 'origin/5.9' into 5.9.0" into ↵Jani Heikkinen2017-05-0912-42/+112
| | |\ | | | | | | | | | | | | refs/staging/5.9.0
| | | * Merge remote-tracking branch 'origin/5.9' into 5.9.0Oswald Buddenhagen2017-05-0812-42/+112
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/geometry/buffer.cpp Change-Id: If4d28a1e4c95cbd8e81b1751eed3214952516d8c
| | * | | Add documentation for Scene2D exampleSean Harmer2017-05-094-2/+138
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2d47b9224e4f26b342cd8a9bbe3c9c5a5e410dc1 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
| | * | | Add scene 2d example to showcase new featureSean Harmer2017-05-097-1/+4577
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ife2ead8fc2f0e0cb6dea18f8a74593847e25ff98 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
| | * | | Scene2D cleanup - register pick events when scene is initializedAntti Määttä2017-05-0911-114/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current model where mouseGrab is connected to picker signal doesn't work. The pressed event is not sent to scene2d item, because it is already lost when scene2d gets the grabMouse message where it registers to the picker events. This breaks the mouse event sequence (press-move-release) for the quick item. Instead hook to setScene of the node to message scene2d when the scene gets initialized and always register to the picker events. Task-number: QTBUG-58876 Change-Id: Ic9ca4b0899a030336ef20ff2cffbe10b567c36f5 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
| | * | | Add autotests for new animation classesAntti Määttä2017-05-0915-2/+1418
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id657443693009455c9307b51e862d43f41255f1d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | | Scene2D cleanup - remove qml engine and sourceMäättä Antti2017-05-096-262/+15
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove QQmlEngine constructor and source property. Update unit tests and manual tests accordingly. Task-number: QTBUG-58876 Change-Id: Ide06bb1381f48efa5378f9a008476734a33089c1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
| | * | Scene3DRenderer: fix race conditionv5.9.0-beta4Paul Lemire2017-05-063-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the window geometry changes, the Scene3DRenderer was updating a Qt3D frontend node's property from the QSGRenderThread. This resulted in the QPostman::notifyBackend being called from possibly two threads at the same time, resulting in a race condition where the changes would never be submitted again to the backend. Change-Id: I842aaa54637d85d4d45eb54620749efb36168e2a Task-number: QTBUG-54900 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Oleg Evseev <ev.mipt@gmail.com>
| | * | Add documentation for simplecustommaterial exampleMäättä Antti2017-05-054-1/+99
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-60287 Change-Id: Id167ddd190b7aa5468bc6590c9f9f4fea234430b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | Update multiviewport example imageMäättä Antti2017-05-053-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | Scene2D: put picking coordinates back in window coordinatesKevin Ottens2017-05-052-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We get the picking coordinates in model local tex coords which have a different convention than the mouse events in window coordinates. So flip them vertically to pass them in the right convention. Change-Id: I558cc62c7c820677407730eead8011193a4b967c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | Add a new mirrored property to QPlane(Mesh|Geometry)Kevin Ottens2017-05-056-7/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is regularly necessary to be able to flip vertically the UV coordinates on the plane mesh depending if we are using a texture in model space coords or in window coords. Especially necessary now with Scene2D which outputs textures in window coords. This property is necessary to make it usable. Change-Id: I0fe7d3fdc125f1791492cf39ebe908bbc20f1db2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | Apply layer filter to light sourcesLaszlo Agocs2017-05-051-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cannot just take all entities with light components: the layer filter must be applied as usual. Task-number: QTBUG-60573 Change-Id: I361fab88745113c1b24b68cbff52051139046d9c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | Merge 5.9 into 5.9.0Oswald Buddenhagen2017-05-0438-260/+795
| | |\ \ | | | | | | | | | | | | | | | Change-Id: I02adbc5294f9d5879cb05e75eccad74196ea2a7c
| | * | | Update qmltypes filesMike Krus2017-05-036-244/+1453
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-60514 Change-Id: Idc42a21109abef5563e6e8cda1a338147bb8dfce Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | | Unregister event filter when surface to closeMike Krus2017-05-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents crash in two window manual test where the object is deleted when PlatformSurfaceFilter destructor tries to remove the event filter Change-Id: I1a37a3cb9088be462957ffbd4412ae5e5241f2df Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | | Update manual tests for changes in APIMike Krus2017-05-034-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia9b5ccf8faed1c22c4fe4054c04a149ff12c6675 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | | Correct shader typo for rendering and fix shader selectionMike Krus2017-05-032-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-60288 Change-Id: I320f787c3b245cc52df80d89c75f856aeacf649d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | | Use non-template version of QVariant::value (clazy reports)Mike Krus2017-05-026-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I998507edff792cfbdcdf2e36e29792fab3c734cf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>