summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add support for remote content in SceneLoaderMike Krus2017-05-217-24/+160
| | | | | | 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-21129-1500/+4057
|\ | | | | | | | | | | | | | | | | | | | | 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-2070-874/+2385
| |\ | | | | | | | | | 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>
| | * 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>
| | * 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-101-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Also add it to highlighted items. Task-number: QTBUG-60287 Change-Id: I87a6074bed171970b287c6cd934e6550d86e27e0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * QNode: setParent create creation change only when neededPaul Lemire2017-05-101-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * 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-097-34/+95
| | |\ | | | | | | | | | | | | refs/staging/5.9.0
| | | * Merge remote-tracking branch 'origin/5.9' into 5.9.0Oswald Buddenhagen2017-05-087-34/+95
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/geometry/buffer.cpp Change-Id: If4d28a1e4c95cbd8e81b1751eed3214952516d8c
| | * | | Add documentation for Scene2D exampleSean Harmer2017-05-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2d47b9224e4f26b342cd8a9bbe3c9c5a5e410dc1 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
| | * | | Scene2D cleanup - register pick events when scene is initializedAntti Määttä2017-05-098-103/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | Scene2D cleanup - remove qml engine and sourceMäättä Antti2017-05-094-205/+9
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-60287 Change-Id: Id167ddd190b7aa5468bc6590c9f9f4fea234430b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | Scene2D: put picking coordinates back in window coordinatesKevin Ottens2017-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0436-259/+786
| | |\ \ | | | | | | | | | | | | | | | 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>
| | * | | 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>
| | * | | Remove unneeded temporary container (clazy reports)Mike Krus2017-05-023-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2a7a94d7b2791382699b39dda1189bc78ce0ff06 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | | Add qAsConst, range-loop might detach Qt container (clazy reports)Mike Krus2017-05-0211-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5d541cd0d08f17c25cbb839c111417130d133c3c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | | Add missing reference in range-for with non trivial type (clazy reports)Mike Krus2017-05-028-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib014b4ad7adc6604e600afc489e3dafaf0e299c1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | | Add missing emit (clazy reports)Mike Krus2017-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3e893a8dff15f4822ba1cde102a50d16daf042ee Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | | Add missing Q_OBJECT (clazy reports)Mike Krus2017-05-026-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0bc49e1b391c610a8f8f649a45391b31f9283302 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | | Fix build with QT_STRICT_ITERATORSSergio Martins2017-05-194-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Which also fixes potential bugs when comparing iterators from different containers in case a detach happens. Change-Id: I5e91f82177d46a0f06272035af837e8a8b196f81 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | | | Implement PIMPL for Qt3DWindowJere Tuliniemi2017-05-154-51/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added private members of Qt3DWindow to Qt3DWindowPrivate to hide implementation. m_aspectEngine is a normal pointer now so that it can be deleted from Qt3DWindow destructor. Screen connection happens after QWindow constructor now because it lacks a constructor that takes a d_ptr and a screen pointer. Task-number: QTBUG-60426 Change-Id: I08e431ec0ea570e5f2c5fb103bcf0fe16e1b23bc Reviewed-by: Antti Määttä <antti.maatta@qt.io>
| * | | | Implement PIMPL for Qt3DQuickWindowJere Tuliniemi2017-05-154-43/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved private members of Qt3DQuickWindow to Qt3DQuickWindowPrivate to hide implementation. m_engine is now a normal pointer so that it can be deleted in the Qt3DQuickWindow destructor. Task-number: QTBUG-60426 Change-Id: I99dd1b89aa2036272add7ba276e9b8f0c867e4a1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | | Document version of assimp libraryKai Koehne2017-05-121-0/+1
| | |_|/ | |/| | | | | | | | | | | | | | Change-Id: I43414f0cb882086bb2bbb85a875fc1045877cd64 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Fix Buffer uploadingPaul Lemire2017-05-084-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to load buffer data when creating it. This led to cases where we would not take into account immediately buffer updates after creation. This would then results in artifacts that would pop up on screen as actual buffer data and count would be different Change-Id: I5a2fad4fb5d7c1e1542cd0bf87ded16a111bc613 Task-number: QTBUG-60429 Reviewed-by: Oleg Evseev <ev.mipt@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | | Logic: only execute FrameActions which are enabledPaul Lemire2017-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib89f6a4eae1b875a17c124337e0e4283d5d62b9e Task-number: QTBUG-60584 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | AssimpImporter: properly handle texture wrappingPaul Lemire2017-05-052-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default the wrap mode is Repeat. If specified it is changed to the appropriate value. Note: This changes also shows that each material could be definining the same texture with different wrap modes. Therefore we cannot store textures only based on their file path like we used to. Change-Id: Ic543c466d7c5cc7cd7e26d1738006952a8ce746b Task-number: QTBUG-59531 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Optimize partial data update support for QBufferOleg Evseev2017-05-042-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now both QBuffer setData/functor and partial data update can be called without unexpected behavior. Optimize applying sequential updates. Change-Id: I5d3a8bcb7eb6eeb3ae33f0fbedbb34acedd1c000 Reviewed-by: Oleg Evseev <ev.mipt@gmail.com> Reviewed-by: Dmitry Volosnykh <dmitry.volosnykh@gmail.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | | fixed graphicscontext applyUniform for uint uniform types.Daniel Bulla2017-05-041-4/+4
| | |/ | |/| | | | | | | | | | Change-Id: I20e4146ba004a9b7f0cd823aa5ceaf2ed4a7103a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Doc: correct several link errorsNico Vertriest2017-05-034-33/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qkeyframeanimation.cpp:61: warning: Can't link to 'Qt3D.Render::Transform' levelofdetailloader.qdoc:40: warning: Can't link to 'minimum' levelofdetailloader.qdoc:40: warning: Can't link to 'maximum' qlevelofdetail.cpp:201: warning: Can't link to 'Qt3DRender::QLevelOfDetail::SizeProxyMode' qlevelofdetailswitch.cpp:62: warning: Can't link to 'LevelOfDetailSwitch::currentIndex' Plus a minor language correction Change-Id: I26096ec74880a406ada27fb3d867983845611410 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * | Renderer: fix OnDemand renderingPaul Lemire2017-04-274-76/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: this is a risky change For some reason the renderer assumed that a RenderQueue would never have a size of 0. This prevented the renderer from calling proceedToNextFrame() on the vsync advance service as it somehow felt that it was a case of rendering with a RenderQueue not yet ready. In the case of OnDemand rendering it is perfectly valid to have a RenderQueue of 0 (nothing has changed that requires rendering) but we still need to call proceedToNextFrame() otherwise syncChanges() is never called and we end up never updating the aspects ever again. The renderer was updated to 1) check if a RenderQueue is complete 2) check if the RenderQueue is empty. (a RenderQueue can be complete but empty (OnDemand case)) 3) Proceed to next frame if RenderQueue is complete or RenderQueue is empty. Change-Id: I27ae778831c9b136db1e1a69892f6fde291fd965 Task-number: QTBUG-59696 Task-number: QTBUG-54900 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Modify configure to build with no assimpMäättä Antti2017-04-272-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Add -no-assimp configure to build without assimp. Task-number: QTBUG-60128 Change-Id: I2ca7bb68d3b659e18bd79039beb5cb6623473859 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Fix -Werror=unused-parameter issueSean Harmer2017-04-271-1/+1
| | | | | | | | | | | | | | | Change-Id: Ibc77241e8d369224eda790b8dcfd900f330bed37 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Fix build for -no-feature-regularexpressionStephan Binner2017-04-272-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: Icff3f2bb2886ba4e077fb43f9a406592435f6fff Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Document QAdditiveClipBlendSean Harmer2017-04-271-49/+74
| | | | | | | | | | | | | | | Change-Id: I8cc48899e31a32f6c1dd9f4f56e3a5fa846bd8f4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>