summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add Qt3DExtras::QAbstractCameraControllerv5.10.0-beta1Andy Maloney2017-10-0310-843/+810
| | | | | | | | | | | | | | Abstracted the orbit and first person camera controllers into a base class. These two controllers shared a lot of similarities. This allows developers to easily create a custom camera controller by deriving from QAbstractCameraController and implementing one function. [ChangeLog][Qt3DExtras][] Added Qt3DExtras::QAbstractCameraController abstract base class to make implementing new camera controllers easier. Change-Id: I43cfbc03f7294b1740f199ac7ededa9578234974 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Extend skinned mesh manual test to use an animatorSean Harmer2017-10-038-5/+4722
| | | | | Change-Id: I890abe966ba617f23a07137c6347fafac97ab591 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update render aspect skeleton's local posesSean Harmer2017-10-031-1/+6
| | | | | | | | This is the receiving side of the changes sent by the animation aspect. Not much to do as everything is already in place. Change-Id: I36a79868d28bab0cf71a176b175e5ea42727979a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Initialize callback to nullptr in MappingData structSean Harmer2017-10-031-1/+1
| | | | | | | Otherwise we inadvertently send callbacks even when not requested. Change-Id: I398c930740133f39982d6b071443fbeee8b029a9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Clear channel component indices for those not present in animationSean Harmer2017-10-033-3/+10
| | | | | | | | | | | | This allows us to only create MappingData objects for those channels for which we actually have animation data. There is no point, and even more importantly, it is dangerous to try to do so as we will overwrite the existing data of the target properties. TODO: Fix this on 5.9 and forward merge to 5.10 Change-Id: Idb9d2fdef0e3297c0f35ad8c4af01b777321674d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update the local poses of the skeleton in the animation aspectSean Harmer2017-10-036-1/+85
| | | | | | | | | | | | | | | | | | | At present it is still needlessly, and incorrectly, updating the transforms of joints for which we have no animation data by using a default value of 0 for each component. This causes the joints to be scaled to 0 which is not particularly useful. We should only update joints for which we have valid animation data and leave the other joints alone. For a skeleton this will be OK as we have the initial set of local poses available. For regular QNode properties, the animator/mapper will need to take a snapshot of the current property value when the animation is started so that we can fill in the missing values when generating property changes. This should also be fixed on the 5.9 branch. Change-Id: Ib8f28c55cdfbca3f335777028f72250641092fc9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Extend buildPropertyMappings to support skeleton mapping use caseSean Harmer2017-10-035-61/+216
| | | | | Change-Id: I2eaf725022f5044d7faf647f8789e73de969d49b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge branch '5.9' into 5.10Sean Harmer2017-09-3022-188/+548
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/animation/backend/animationutils.cpp src/animation/backend/animationutils_p.h src/render/geometry/qmesh.cpp tests/auto/animation/animation.pro Change-Id: Ifb57bfb0b12b3ebf9ee177d4ea684134455b4143
| * Remove unused buildPropertyMappings() overload and testsSean Harmer2017-09-293-133/+1
| | | | | | | | | | | | | | Everything goes through the other overload now. Change-Id: Id0c196a6967a9f83e47092ca1fc7f4ab4ebe9309 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
| * Move the non-blended animation codepath closer to the blended oneSean Harmer2017-09-294-15/+39
| | | | | | | | | | | | | | | | | | Will make it possible to reduce the amount of code to maintain and test. There are still several ways to optimize this too so best to only do it for one code path that all animators use. Change-Id: I05ebd4f41d88aa0bea37d4d17130bc79c96ebd5c Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
| * Add unit test for FindRunningClipAnimatorsJobSean Harmer2017-09-296-2/+349
| | | | | | | | | | | | | | Should pass before and after the refactoring. Change-Id: I9ef8f948f03a131546fc6485e9c66494ff383714 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Add convenience function to ChannelMapper to return list of MappingsSean Harmer2017-09-273-2/+66
| | | | | | | | | | | | | | | | Caches the resolution of node ids to ChannelMappings. Updated test to check this new feature. Change-Id: I0c2f539c2bd91e7918b98c5b60c9ca486b63ec08 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * Ensure meshName gets used in the functorSean Harmer2017-09-272-2/+32
| | | | | | | | | | Change-Id: I9015546607b5663f1feada64bc03cb73d3538ef2 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * Actually get matching clip indices for componentsSean Harmer2017-09-262-15/+14
| | | | | | | | | | | | | | | | | | | | | | Rather than assuming they are in order. The blended clip animator code path now behaves the same as the simple QClipAnimator in that it can handle clips with channel components not in the expected order. We can now look at making both share a common code path. Change-Id: I61848e07b4f418ba9f4c56f56f4f49c9a5fbd588 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * Avoid deep copy in loopSean Harmer2017-09-261-1/+1
| | | | | | | | | | Change-Id: I5a86547ae669394c290b30427f98821bc7552a63 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * Fix gathering clip value node idsSean Harmer2017-09-264-5/+19
| | | | | | | | | | | | | | | | This correctly handles the case where the blend tree consists of a single value node. Added test case to catch it. Change-Id: I8982d2081748866d163f107a4513bd2d17feb83a Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * Copy size and pixelRatio when switching activeFrameGraphAnders Hafreager2017-09-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Copy externalRenderTargetSize and surfacePixelRatio from old to new surfaceSelector when setting activeFrameGraph on RenderSettings. Previously, when switching activeFrameGraph, surface was copied from old to new surfaceSelector, but these other properties were not. The rendered image was then stretched until window is resized again. Change-Id: I62b78da05c764f981813ab96b9a769bae7d786b2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Don't crash objgeometryloader on ill-formed face, just ignoreWieland Hagen2017-09-221-1/+1
| | | | | | | | | | | | | | | | For < 3 vertices, array accesses would fail, and face creation not make sense anyways Change-Id: I5eb746dfdec92d1c836e9870d87e7900530ec81c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Clear TextureData flag after texture uploadWieland Hagen2017-09-151-0/+1
| | | | | | | | | | | | | | Or else we will continue uploading data indefinitely Change-Id: If81d8a0a790964c699462fbcb166808ee7859f59 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Doc: add doc to class AssimpImporterNico Vertriest2017-09-291-3/+3
| | | | | | | | | | Change-Id: I8ce9c418b6a77aa6ec8054bdacfd69152924fbfe Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Doc: add doc to classes GLTFImporter and GLTFExporterNico Vertriest2017-09-292-4/+54
| | | | | | | | | | Change-Id: I890be56a59be47923bd0c2db31d72d3c2c45ae0e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Since the ES2 includes use FP make sure it is definedKevin Ottens2017-09-273-0/+6
| | | | | | | | | | Change-Id: Ibb735878c6c6b7f14eb26a0f98c200045b4979b6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | ES2 has gl_FragColor and not gl_fragColorKevin Ottens2017-09-271-1/+1
| | | | | | | | | | Change-Id: I4d22b177745b257950212e48fa550143813c4f6b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add phongFunction to the nodes prototypesKevin Ottens2017-09-271-0/+34
| | | | | | | | | | Change-Id: Iad0b51e19cc78683f18db0ae2718df6abd4ba72f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add ES2 rules for the worldSpaceToTangentSpaceMatrix node prototypeKevin Ottens2017-09-271-0/+9
| | | | | | | | | | Change-Id: I35c12c52a965a554b49cdb6ebb8f65658e8ecea3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Move phongFunction in its own include fileKevin Ottens2017-09-2721-271/+425
| | | | | | | | | | | | | | | | | | Makes it cleaner overall since the light structs were shared with the metalrough includes and the gooch fragment shader but they didn't use the functions in there. Change-Id: I459ff0fc2d751a5be9296dc33dda0efcb06b917c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add textureScale to MetalRoughMaterialKevin Ottens2017-09-273-0/+35
| | | | | | | | | | | | | | | | | | | | This property was available in the textured phong variants but somehow we didn't implement it yet for metal/rough. This new parameter is not used yet, but will be in the next commit where we unify the vertex shaders. Change-Id: I0d5293f6413a4a0412d92d2d42bf700238938fc6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Move most vertex shaders into a unified oneKevin Ottens2017-09-2717-186/+105
| | | | | | | | | | | | | | | | | | We currently do a bit more work than strictly needed in some cases, but that will change later on when this shader is converted into a graph. Changing now will make this future refactoring easier. Change-Id: I887601c18575bef79e25a23ed054aa336b1e860a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Fix clock sync for the blendedclipanimatorJuan José Casafranca2017-09-271-0/+2
| | | | | | | | | | | | | | The clockId was not being sent to the backend as part of the change Change-Id: Ibaa57ec1853b5ec29942f027b68565d87838761e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Remove the *alpha.frag from extrasKevin Ottens2017-09-277-120/+4
| | | | | | | | | | | | | | | | They are identical to their non-alpha counterparts at that point, so no need to keep them around. Change-Id: Ia3961670dc1d5c0f65711476c8dc6cc467df62c5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | PhongAlpha: encode the alpha in kdKevin Ottens2017-09-275-26/+23
| | | | | | | | | | Change-Id: I331dd9b4adf7a412338daba6d11ca945dc290054 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Wrap adsModel into phongFunctionKevin Ottens2017-09-2523-148/+149
| | | | | | | | | | | | | | This way the use is more similar to the one for metal/rough. Change-Id: I143df910f43e29ef622f24bd97a23c90a2c8ef68 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Base PerVertexColorMaterial on adsModelKevin Ottens2017-09-255-161/+8
| | | | | | | | | | | | | | | | Since this was the sole user of adModel we also remove it in the process. Change-Id: Ibb79bb05c10b33e69601624ea9ad1fdf8523fdbf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Get rid of adsModelNormalMappedKevin Ottens2017-09-2217-308/+189
| | | | | | | | | | | | | | | | | | | | | | | | All materials and examples are ported away from it. It was really not related to normal mapping at all, somehow it was an implementation of adsModel working in tangent space instead of world space. Now we got it all in world space, just like for the metal/rough implementation. Change-Id: I3346277ce9b91328d70d914b319ac25f947fff0e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add an aspectRatio standard uniformKevin Ottens2017-09-222-0/+4
| | | | | | | | | | Change-Id: I83e750c131ba070ce68b42a9837bd01dd064173c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Port away from QBuffer::typeKevin Ottens2017-09-2210-18/+18
| | | | | | | | | | Change-Id: I910d1fa7099dc726e022cbf35702b0b58fbac64e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Deprecate QBuffer::typeKevin Ottens2017-09-227-38/+21
| | | | | | | | | | | | | | | | It can also be removed from the backend class, now the renderer doesn't look at it anyway. Change-Id: I5643922dccc81c0ee33f80e4b0ea34b63e51d89c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Rely on the attribute type for the binding pointKevin Ottens2017-09-222-16/+8
| | | | | | | | | | | | | | | | Stop reading the buffer type from the buffer object and instead use the attribute type to determine the binding point. Change-Id: I95856776297252c6e332f842c2b5362d1467e420 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Explicitly pass binding point on buffer creationKevin Ottens2017-09-223-13/+13
| | | | | | | | | | | | | | | | | | This way we don't rely on the buffer type member in those case, this can be all determined from the current context anyway. It also prevents forcing a single use for a buffer. Change-Id: I8c5ec3878bd36ddbfd257adfb218561d44f18823 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Hardcode a binding point for buffer downloadsKevin Ottens2017-09-221-1/+1
| | | | | | | | | | | | | | | | For downloading the data from a buffer, similarly to uploads, the binding point doesn't really matter so always use the same binding point. Change-Id: I5950e58ff8a0acc719ea784cdf2fb2370077c868 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Hardcode a binding point for buffer uploadsKevin Ottens2017-09-221-3/+2
| | | | | | | | | | | | | | | | | | | | | | For uploading the data in a buffer, the binding point doesn't really matter so always use the same binding point. This is the first step toward finally deprecating QBuffer::type, this is going to be a long journey it seems. Change-Id: Icad36d35764cbc25d249a651b80ebbce6b34828d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add a simple example showing all phong variantsKevin Ottens2017-09-226-1/+322
| | | | | | | | | | Change-Id: Idcbb8a42658c6525f852e2f226ce816d779ee9c7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Fix a typo in 'metalrough.frag.json'Renato Araujo Oliveira Filho2017-09-191-1/+1
| | | | | | | | | | | | | | Fix 'ambientOcclusionMap' layer name Change-Id: I64b25a6958c60728471909686db39e89f916d16a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Fix planets-qml example for Qt 5.10Tomi Korpipaa2017-09-192-3/+8
| | | | | | | | | | | | Task-number: QTBUG-62321 Change-Id: I1df375c9a6a72049584eee118613bca72958e4f0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge branch '5.9' into 5.10Sean Harmer2017-09-1259-1788/+543
|\| | | | | | | Change-Id: Id6a3d4ec579a2f2a2e559c22a2293d0e184f0bdf
| * Fix crash on surface selector unit testMike Krus2017-09-121-2/+2
| | | | | | | | | | | | | | | | Change order of local variables affecting the destructions order and making sure window outlives the surface selector Change-Id: Ia04f110656f4cc563643fb056ae491ffadf3a8b4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Fix bounding sphere pickingMike Krus2017-09-124-8/+195
| | | | | | | | | | | | | | | | | | | | In some cases, the list of pickable objects may contain entities that don’t have an object picker (or not parent has). Now filter the pick results to only keep entities which either have an object picker or are children of an entity that does. Added unit test which now passes Change-Id: I930c3d60cf2d19e845fe6c0de904c53b93ebe8be Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * Get rid of the AllocationPolicy template argument in the ResourceManagerLars Knoll2017-09-1115-98/+32
| | | | | | | | | | | | | | We always use the same policy anyway. Change-Id: I3349b8c19ce0e6239b140dfac7ba66f8dda1b9be Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Get rid of the HandleManager classLars Knoll2017-09-1111-701/+88
| | | | | | | | | | | | | | | | | | Instead, direclty use the Allocator to acquire and release handles without an additional indirection. This removes around 30% of the overhead in run(). Change-Id: Ic4a9343dd52a900eb1c7eb6b4135bc7670076df1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Remove ArrayPreallocationPolicyLars Knoll2017-09-115-526/+13
| | | | | | | | | | | | | | It's not used anywhere Change-Id: Id65ec9fc8e38697c0dbd23fe4f816e1637a22483 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>