summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Verify a texture is valid before updateJuan José Casafranca2017-04-253-0/+16
| | | | | | | | | | | Texture images may be deleted before the texture it references to them. This happens when the texture is added and removed very fast. Verify all the texture images that the texture reference still exist before updating the texture. Task-number: QTBUG-59418 Change-Id: Idacbdd1a45eb0fa5b871d57688e9d02b823f7b5f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Set camera lens exposure on creation of backend nodeSean Harmer2017-04-141-0/+1
| | | | | | | | Exposure was not being propagated to the backend until changed subsequent to creation. Change-Id: I9dd50ace6a84bad4c505b94f8cbb3a31d6678a34 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Enable the seamless cubemap extension for SkyboxEntitySean Harmer2017-04-141-0/+5
| | | | | | | | Avoids nasty artifacts along cubemap face boundaries. Task-number: QTBUG-60180 Change-Id: I2fbc125efc0897526779eedaaabe5a9594315f9f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Don't generate mips for skybox entity when using loaded textureSean Harmer2017-04-141-0/+1
| | | | | | | | | | | DDS file should contain mips if needed. This improves the start up time of applications using skybox entities a lot! I assume it was so slow because the mip generation had to be done on the CPU for cubemaps or because we're using compressed textures. Task-number: QTBUG-60182 Change-Id: I9760477063543b7be19bf98a94a65a1e62b8557a Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Use correct implicit geometric shadowing/masking term in BRDFSean Harmer2017-04-142-2/+2
| | | | | | | | | | | | | | | | | | | For an implicit BRDF shadowing/masking term, we should be using the factor from the denominator so that they cancel out. Otherwise we get overly strong specular highlights at glancing angles due to the vDotN factor blowing up. For more potential microfacet factors see: http://graphicrants.blogspot.co.uk/2013/08/specular-brdf-reference.html or http://simonstechblog.blogspot.co.uk/2011/12/microfacet-brdf.html Task-number: QTBUG-60179 Change-Id: I7899bd6983c3645f16ebc6d22db843b141fe913c Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Don't enable default light when an environment light is usedSean Harmer2017-04-141-1/+2
| | | | | | | | Just causes confusion and leads to saturated fragments. Task-number: QTBUG-60178 Change-Id: I39c281cf2f3a78c1b90330efae6584ac181a5310 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Simplify code example in QAbstractAnimationClipv5.9.0-beta2Sean Harmer2017-04-131-11/+5
| | | | | Change-Id: I8236b3839196ad0c04323fab64d8496e2e8c64c0 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add convenience ctor to QClipBlendValueSean Harmer2017-04-132-1/+10
| | | | | | | Also mark other ctor as explicit as a drive by. Change-Id: I34f20651f20462f988990657554e14aaefc7f50f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add convenience ctor to QAnimationClipLoaderSean Harmer2017-04-132-0/+9
| | | | | | | | Typically all we do is create and set source. Allow this to be a one-liner. Change-Id: Ie754bd3e0f70eb3e486b0b07be27fb458cd65093 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Pass QUrl by const ref in QAnimationClipLoaderSean Harmer2017-04-132-3/+3
| | | | | Change-Id: Id905adc7bbaea2342f82a0e4007d2db79a739084 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Document QAbstractAnimationClipSean Harmer2017-04-131-0/+86
| | | | | | Change-Id: Iec70236a5af333a0149d229b6c9d528629fa3107 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Flesh out animation module overview documentationSean Harmer2017-04-131-4/+136
| | | | | Change-Id: If5f3788325cd96845151c0f41c3ffc890edbeab6 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
* QRenderCapture: add saveImage() to replace saveToFile()Andy Maloney2017-04-122-1/+36
| | | | | | | | | QRenderCapture::saveToFile() does not return success/failure. Returning this properly means we don't have to verify success somehow. So add a new method called saveImage() to return the information, and deprecate saveToFile(). Change-Id: I7cf6639d90baa8bce8b90ee795d953a021de7978 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove defunct TODO commentSean Harmer2017-04-121-1/+0
| | | | | Change-Id: Ida7608b2ad2d50913d533a7fa58e21c86607a095 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Rename AnimationClipLoader to AnimationClipSean Harmer2017-04-1217-49/+49
| | | | | | | | It handles both loadign from file and from data constructed using the public API. Change-Id: Ic9e71dc60c36869548323312f7129df6c9edd763 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add a flag to AnimationClipLoader to track where its data comes fromSean Harmer2017-04-122-3/+31
| | | | | | | Nicer than implicitly tracking it via m_source.isEmpty(). Change-Id: I120cb3728504b2bbc77d5959711a3f94731399ce Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Refactor clip loading and add support for loading from dataSean Harmer2017-04-124-11/+77
| | | | | Change-Id: I5be059618f22676491e08aa2fc0252c806073b07 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Picking: don’t emit click if mouse released on different entityMike Krus2017-04-121-5/+4
| | | | | | Task-number: QTBUG-59582 Change-Id: I88e49add59d1caa3167576c8f0c014dd61211f29 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add plugins.qmltypes file for scene2dMäättä Antti2017-04-121-0/+121
| | | | | | | | Add plugins.qmltypes file for scene2d for tooling Task-number: QTBUG-60100 Change-Id: I23376960f6cdedd099006ad89132e7e4904e6588 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add skeleton documentation for scene2d moduleMäättä Antti2017-04-124-8/+114
| | | | | | | | | Add a skeleton documentation. The scene2d docs still need updating with proper usage instruction and docs for the final IF. Task-number: QTBUG-60099 Change-Id: I0a0f329d22b4f694bc663e635533f298da7e0605 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use interpolation enum from QKeyFrameSean Harmer2017-04-112-9/+3
| | | | | | | No point in duplicating this on the backend just for the sake of it. Change-Id: I1852f7f22d5519b260ed90adce3715ab4257df61 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Start adding support for programmatic clips to the backend nodeSean Harmer2017-04-116-7/+39
| | | | | Change-Id: I7503f87550487528956cd97606a24e25cf2e5144 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix header include guardsSean Harmer2017-04-111-3/+3
| | | | | Change-Id: I0da3cbda44614f0435787b630ff530ae0f71b6bc Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Register QAbstractAnimationClip to create AnimationClipLoadersSean Harmer2017-04-111-3/+3
| | | | | | | | | | | | This means that both QAnimationClipLoader and QAnimationClip objects will get QAnimationClipLoaders created on the backend. The two cases are so similar on the backend that one class can easily handle both. We will renamed the backend type to not mention Loader in a future commit (once it's all working). Change-Id: I713e79b1652760acd2c3522015e85ae0c8aaccd8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Export QAnimationClip to QMLSean Harmer2017-04-111-0/+2
| | | | | Change-Id: I3a96ca3a56690ed9c50fb7e70eb9c2aba33357ec Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add QAnimationClip classSean Harmer2017-04-114-2/+262
| | | | | | | | Analogous to QAnimationClipLoader but gets the animation data from the application rather than from a baked file. Change-Id: I85cb29fb021e6969b82b814077f68eeef5927f04 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add value types for animation dataSean Harmer2017-04-119-2/+934
| | | | | Change-Id: I477559e20dd10115a8aba0a2845b0e4e003e07c8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Use obj loader plugin by default if file has no extensionMike Krus2017-04-091-0/+2
| | | | | | Task-number: QTBUG-58796 Change-Id: I6478b28c5d39ea8166a2e7c33021f1476d5524dd Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix local localIntersection computation in pickingMike Krus2017-04-091-1/+1
| | | | | | Task-number: QTBUG-58215 Change-Id: Ib30c6c8b5e8df7e0b067c9cad00c7d1c5af98948 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Silence warning about unused parameterThiago Macieira2017-04-081-0/+1
| | | | | | | | | Found by MSVC: qt3dquick_global.cpp(577): warning C4100: 'dstSize': unreferenced formal parameter Change-Id: I43f05fedf0b44314a2dafffd14b34185348d109d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix warning about cast from ASCIIThiago Macieira2017-04-081-1/+1
| | | | | | | qt3dquickscene2dnodefactory.cpp:55:64: warning: ‘QString::QString(const char*)’ is deprecated [-Wdeprecated-declarations] Change-Id: I37cc967e689f4523b504fffd14adf00e7d8ef4bf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Silence ICC warning about unused local variableThiago Macieira2017-04-071-1/+1
| | | | | | | | | | quick3dshaderdata.cpp(56): error #2415: variable "Qt3DRender::Render::Quick::<unnamed>::quick3DShaderDataTypeId" of static storage duration was declared but never referenced Since the initialization has side effects, we need to keep the variable, so just mark it unuse. Change-Id: I27b55fdf514247549455fffd14b1c9712ac05281 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix spelling in comments and docsAndy Maloney2017-04-0611-15/+15
| | | | | Change-Id: Ib93da3bc94ee43980d1190955c8c37e886c4b0fa Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix crash in rendercapture-cppAntti Määttä2017-04-051-3/+5
| | | | | | | | | | The completed signal can deallocate the RenderCaptureReply, which causes the deprecated signal call to crash. Add Weak pointer to the reply to detect this and call the signal only if the reply is still valid. Change-Id: Ib0324fb3637bb1cad3e17b0e7cc47a8be67b9319 Reviewed-by: Juan José Casafranca Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Qt3D: add configure option for jobs and GL profilingPaul Lemire2017-04-0511-27/+51
| | | | | Change-Id: Idb1f54d231e469670b24b2b2aecedbfc1cd0f956 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Hook Scene3D cleanup on scenegraphInvalidated tooLaszlo Agocs2017-04-052-10/+24
| | | | | | | | | | | | | The invalidated signal is nice since it works in all cases, both with real QQuickWindows and ones driven via QQuickRenderControl (e.g. QQuickWidget). With QQuickWidget just relying on windowChanged is pretty bad since the window change comes way too late due to the diffeerences in widget handling internals. Task-number: QTBUG-52132 Change-Id: I8639e4d60514eeeb00fa9dda2329de6088f2a44d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix include guards in QAnimationClipLoaderSean Harmer2017-04-051-3/+3
| | | | | Change-Id: Ic093486191f35bdda018c1470623fd57b05b0675 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Ensure Shader disconnects the destroyed listener from the contextLaszlo Agocs2017-04-041-0/+2
| | | | | | | | | | | | cleanup() is never called. The signal must be disconnected nonetheless, otherwise bad things can happen. For example, with a Scene3D in a QQuickWidget the context will be destroyed at a different stage than with QQuickWindow, and Shader may already be destroyed at that stage. Task-number: QTBUG-52132 Change-Id: Icbc8fe0294e0fa6a33385f7d9a2f81ef9f514283 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix Scene3D initialization in QQuickWidgetLaszlo Agocs2017-04-032-2/+23
| | | | | | | | | | Scene3D can now be used inside a QQuickWidget. There are some remaining problems, most notably an assert when exiting, but at least the scene shows up now. Task-number: QTBUG-52132 Change-Id: Ifc05d859711f5f42342e111c1d7cbea7ba373552 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix QML registration of QAnimationClipLoaderSean Harmer2017-04-031-1/+1
| | | | | Change-Id: I8fae537aa38059ff2592c2f49c238408ea27f7e0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix qmake warning caused by incorrect capitalizationSean Harmer2017-04-021-1/+1
| | | | | Change-Id: Ibe0134eafa986e93e725fd4fc98177b69938b1df Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Merge "Merge branch '5.8' into 5.9" into refs/staging/5.9Sean Harmer2017-04-02362-975/+2908
|\
| * Merge branch '5.8' into 5.9Sean Harmer2017-04-02362-975/+2908
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/jobs/qthreadpooler.cpp src/core/nodes/qcomponent.cpp src/core/qpostman.cpp src/core/qscene_p.h src/core/services/qservicelocator_p.h src/input/frontend/qinputaspect.cpp src/plugins/sceneparsers/assimp/assimpimporter.cpp src/plugins/sceneparsers/assimp/assimpimporter.h src/plugins/sceneparsers/gltf/gltfimporter.h src/plugins/sceneparsers/gltf/gltfio.cpp src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp src/quick3d/imports/extras/qt3dquick3dextrasplugin.cpp src/quick3d/imports/render/qt3dquick3drenderplugin.cpp src/quick3d/quick3dextras/qt3dquickwindow.cpp Change-Id: I3566708c6f74a34959e7bb64b64e93647ca3f699
| | * Coding convention fix for Src/importscore, importsextras,5.8Robert Brock2017-04-0117-129/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | importsinput, importsrender, importsscene3d Reordering the header includes to comply with Qt coding conventions Task-number: QTBUG-56185 Change-Id: I3b2b3ee60e397772bbcebac09b07c059fbd922db Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Fixes includes to comply with coding conventions for Src/sceneRobert Brock2017-04-016-45/+43
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-56185 Change-Id: Ie52778260f5d2b82e79207bc8f7a77c9f9082935 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Coding convention fix for Src/ExtrasRobert Brock2017-04-0146-80/+115
| | | | | | | | | | | | | | | | | | | | | | | | Reordering the header includes to comply with Qt coding conventions Task-number: QTBUG-56185 Change-Id: I76f4eeb93b02b20f1d85d745f39253fd22327ef7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Coding convention fix for Src/Quick3DRobert Brock2017-04-0175-145/+182
| | | | | | | | | | | | | | | | | | | | | | | | Reordering the header includes to comply with Qt coding conventions Task-number: QTBUG-56185 Change-Id: I60008858a4975621b9159d909908b6bba2f98f14 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Fixes includes to comply with coding conventions for Src/CoreRobert Brock2017-03-31112-288/+358
| | | | | | | | | | | | | | | | | | | | | | | | Reordering the header includes to comply with Qt coding conventions Task-number: QTBUG-56185 Change-Id: I3943678c183c4ef46d403e0fff878c3cad964dfa Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Coding convention fix for Src/inputRobert Brock2017-03-16105-208/+307
| | | | | | | | | | | | | | | | | | | | | | | | Reordering the header includes to comply with Qt coding conventions Task-number: QTBUG-56185 Change-Id: I1d1b61c2fac42505f85a1c4421e1292259270568 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Unroll loops in ES2 shadersMauro Persano2017-03-161-83/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GLSL ES specification (up to at least 3.0) does not mandate support of dynamic indexing of uniform block arrays. It is supported by some implementations (Tegra, Adreno 5xx) but we can't count on it being supported in general. Unfortunately some mobile drivers don't seem to be smart enough to automatically unroll loops at compile time when the condition is constant. Task-number: QTBUG-54994 Change-Id: I44e7fa18dc46f0a11204cf98e3c7b4f3ed446327 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Oleg Evseev <ev.mipt@gmail.com>