summaryrefslogtreecommitdiffstats
path: root/src/core
Commit message (Collapse)AuthorAgeFilesLines
* Decompose a new quaternion rotation into euler anglesSean Harmer2017-10-062-21/+34
| | | | | | | Same as in QTransform. Change-Id: Ia1dca19c8faf996629ecbf8832e5625e7b22532c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update the local poses of the skeleton in the animation aspectSean Harmer2017-10-031-0/+1
| | | | | | | | | | | | | | | | | | | 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>
* Merge branch '5.9' into 5.10Sean Harmer2017-09-1213-756/+136
|\ | | | | | | Change-Id: Id6a3d4ec579a2f2a2e559c22a2293d0e184f0bdf
| * Get rid of the AllocationPolicy template argument in the ResourceManagerLars Knoll2017-09-111-10/+6
| | | | | | | | | | | | | | 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-114-351/+84
| | | | | | | | | | | | | | | | | | 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-111-54/+1
| | | | | | | | | | | | | | It's not used anywhere Change-Id: Id65ec9fc8e38697c0dbd23fe4f816e1637a22483 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Improve dependency look-upChristian Strømme2017-09-069-342/+45
| | | | | | | | | | | | | | | | | | Simplify the dependency look-up by moving the dependers directly into the dependee runnable, each task is then responsible for updating their dependers and queue them up when they are free to be run. Change-Id: I96295d47cecd507a864965e1fb65f2ff9af68111 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Send joint names and local poses from render to animation aspectSean Harmer2017-08-301-0/+16
| | | | | | | | | | | | | | | | | | This will allow the animation aspect to easily update the local poses of all joints in a skeleton without needing to be able to address any frontend QJoint objects. Change-Id: Id2137f2533702387dc68296aba1dd8627b0599d6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add name property to QJointSean Harmer2017-08-303-0/+23
| | | | | | | | | | | | | | And set it from the backend when creating frontend joints. Change-Id: I26d37c7f516944eb353af38716aab4c55bd2f79f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge branch '5.9' into devSean Harmer2017-08-191-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/backend/renderer.cpp src/render/backend/renderview.cpp src/render/graphicshelpers/graphicscontext_p.h src/render/graphicshelpers/graphicshelperes2_p.h src/render/graphicshelpers/graphicshelpergl2_p.h src/render/graphicshelpers/graphicshelpergl3_2_p.h src/render/graphicshelpers/graphicshelpergl3_3_p.h src/render/graphicshelpers/graphicshelpergl4_p.h src/render/graphicshelpers/graphicshelperinterface_p.h src/render/jobs/pickboundingvolumejob.cpp tests/auto/animation/clipanimator/tst_clipanimator.cpp tests/auto/auto.pro tests/manual/manual.pro Also disabled the QQmlMetaType codepaths following commit 49a11e882059ee1729f776722e085dd21d378c36 in qtdeclarative. The QQmlMetaType codepaths will be re-enabled once a qt5.git integration has succeeded. Change-Id: Ia654d75425e6d406c472d19864383612208cad2b
| * Fix compilation on linux with -qt3d-profile-jobsPaul Lemire2017-08-031-0/+1
| | | | | | | | | | Change-Id: Iebecab6fa362bb6bda4ee720cb0259214ced52a4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Disable SIMD for msvc2013 on x86Sean Harmer2017-08-171-2/+2
| | | | | | | | | | | | | | | | Avoids an internal compiler error. Task-number: QTBUG-62551 Change-Id: I74275d07cfbff2c7053d819fe7fb64fe69a2f634 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add euler rotation angle convenience properties to QJointSean Harmer2017-08-163-0/+113
| | | | | | | | | | | | | | As we did for QTransform. These are frontend only properties. Change-Id: Ic2fb1080ff68e26437c7e35632bdfcc00e51c017 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Create SkeletonData from Joint backend nodesSean Harmer2017-08-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be done either by using a QSkeleton on the frontend or with a QSkeletonLoader that has the createJointsEnabled property set to true. In the latter case, the loader creates the joint node hierarchy on the backend then moves them to the main thread in a similar way to QGeometryRenderer handles Geoemtry. Once the joint hierarchy is set on the frontend QSkeletonLoader, it notifies the backend and from there it follows the same code path as for QSkeleton. Change-Id: I5f673e154bb3a3e677b80b8ee984f4168403c288 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Update skinned mesh example to expose joints of objectSean Harmer2017-08-166-3/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | To do this we add a helper Sqt struct that wraps up an affine transformation as a scale vector, rotation quaternion and a translation vector. This is the format in which the animation aspect will animate the joints later so it's easier to keep the transforms split like this. It's also less data to move around compared with a 4x4 matrix (10 vs 16 floats, 12 including the padding). Change-Id: Iaa30b5ef5d1635cc208ead918827140cf2765908 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Matrix4x4: simd (AVX2 and SSE) matrix classesPaul Lemire2017-08-119-10/+1400
| | | | | | | | | | Change-Id: I8a4d8542a12a9ec6631f76515c0da41cd1c679fe Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add inverseBindMatrix property to QJointSean Harmer2017-08-103-0/+43
| | | | | | | | | | | | | | Needed to compute skinning palette of matrices. Change-Id: Ifec41c2bb18855bbb2c332cf80d37642d34f75cf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Change scale property of QJoint to QVector3DSean Harmer2017-08-103-11/+11
| | | | | | | | | | | | | | Seems to be the norm for joints. Change-Id: I98d786b64153b09e2cd06e9d525f6c80f6372316 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add Vector3D simd classPaul Lemire2017-08-105-8/+544
| | | | | | | | | | Change-Id: I9a454a3b3be3ad1878eaf09cf2ff77aa2bfbe208 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add Vector4D simd classPaul Lemire2017-08-104-2/+539
| | | | | | | | | | Change-Id: Ib9e4e5f9fddcc380152bd4e167072ff815a4da30 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add jointCount property to QAbstractSkeletonSean Harmer2017-08-094-0/+46
| | | | | | | | | | | | | | Set this from the backend when a skeleton is loaded. Change-Id: I752670b93b6ae1fad70534b5f8983ae2ca86fd78 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add basics of Skeleton backend node to render aspectSean Harmer2017-08-098-4/+270
| | | | | | | | | | | | | | Loading of skeleton will be handled in a follow up commit. Change-Id: I4466524098e7cf33d6c39f70752d8bd632bac1f1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add QArmature componentSean Harmer2017-08-084-2/+342
| | | | | | | | | | | | | | | | | | This will be used by the renderer to perform skinning of the mesh passed to QGeometryRenderer when coupled with a suitable vertex shader via QMaterial. Change-Id: I54f414313ba04aea5f2f1777244cb93cd1bfd688 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add QSkeleton and QSkeletonLoaderSean Harmer2017-08-0710-2/+936
| | | | | | | | | | | | | | | | | | | | | | | | | | They both inherit from QAbstractSkeleton which exists purely to provide a type for setting skeletons on the upcoming QArmature component. The classes relate in the same way as QAbstractAnimationClip, QAnimationClip and QAnimationClipLoader. The skeleton provides the joint hierarchy that can be animated and then used to skin a mesh via the upcoming QArmature component. Change-Id: I4be8ce3f1d6cbca4af08c5829b33172a2f951b11 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add QJoint frontend typeSean Harmer2017-08-074-4/+439
| | | | | | | | | | | | | | | | | | | | Represents a joint within a skeleton. For now we limit the scale to a uniform scale represented by a single float. If there is demand we can extend this to support non-uniform scales for joints using a QVector3D. Change-Id: Ib65e45d14c5e40227801c0a70ac5b68557c7e8e9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add -qt3d-simd option to enable SIMD instructionsPaul Lemire2017-08-071-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SSE2 SIMD option is enabled by default if the respective qtbase feature is enabled. In this sense, this is an opt-out feature. The SIMD instructions can also be extended to take advantage of AVX2 instructions by passing -qt3d-simd avx2. The use of SIMD instructions in Qt 3D can be disabled entirely with -qt3d-simd no. Note that these options *force* the use of SIMD instructions. This differs in semantics from the qtbase configure options for SIMD. In qtbase, there is also a runtime check on CPU capabilities before using SIMD instructions (except SSE2 on x86 or x86_64). Profiling in Qt 3D found that such function pointer indirection totally negated any performance gains. Therefore, given the need to choose this at compile time, this commit introduces a new option with these semantics. [ChangeLog][Qt3DCore][General] Added support for SIMD instructions to accelerate matrix and vector operations within Qt 3D. At present, SSE2 and AVX2 are supported. By default, SSE2 instructions are enabled. To additionally enable the use of AVX2 instructions, configure with the -qt3d-simd avx2 option. Passing -no-sse2 disables SSE2 use in QtCore, QtGui and Qt3D. Configuring with -no-qt3d-simd disables SIMD in Qt 3D only. Change-Id: Ifcc05004f39a420aa578c3e09d1236dea1fb1990 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add missing #includeSean Harmer2017-08-061-0/+1
| | | | | | | | | | | | | | | | In some cases this fails to compile due to not knowing about the QComponent type. Change-Id: I3cff5c72fdbabdb238b5220f7c3bddf841efab21 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Properly use QT_CONFIG for Qt3D profiling optionsPaul Lemire2017-08-0310-33/+28
| | | | | | | | | | | | Change-Id: Id3bb7bb657f3d48c6c4cd3d5e86c43ad64dca791 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Fix config for importing buildsMike Krus2017-08-021-1/+1
| | | | | | | | | | | | | | | | Importing builds (in Creator) was broken because OUT_PWD is not known at that time, reported as QTCREATORBUG-18663 Change-Id: Iccc0876b6568aeaabb003ea3177f9a095be1442a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Make ThreadPool thread count configurable with QT3D_MAX_THREAD_COUNTPaul Lemire2017-08-021-0/+7
| | | | | | | | | | Change-Id: I50671d11b2c6ae950abe013ad371c1f1f74516b0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Allow to disable aspects at configure timePaul Lemire2017-08-022-2/+50
| | | | | | | | | | | | | | | | | | This allows to remove dependencies and reduce deployment size when a given aspect is not required. Change-Id: I5aa90e4825b375cd446c47727aa11d03c40703c9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Initialize QBackendNodes after setting arbiterJan Marker2017-07-181-2/+3
| | | | | | | | | | Change-Id: Ib329915e7962b0e60b0cbb66e5801f4a96fdf23a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add support for animation callbacksLaszlo Agocs2017-06-232-0/+2
| | | | | | | | | | | | | | | | Let QChannelMapping optionally specify a callback, which then gets invoked either directly on a worker thread or the gui thread. Change-Id: I871776f47cc921ceb254f9dc1a7b89ae5c5618d8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge branch '5.9' into devSean Harmer2017-06-193-3/+13
|\| | | | | | | | | | | | | | | | | Conflicts: src/render/frontend/qcameralens_p.h src/render/texture/qtexture.cpp src/render/texture/qtexture_p.h Change-Id: I20b25cf123f44c96f69ca5f8e042a38692e5cb49
| * Doc: add basic doc to undocumented classesNico Vertriest2017-06-092-0/+10
| | | | | | | | | | Change-Id: Ib67712bd961a3e0b113ddd25feaa819695e792b9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Normalize Q_ARG to avoid temporary memory allocationsSergio Martins2017-06-031-3/+3
| | | | | | | | | | | | | | Found by -Wclazy-connect-not-normalized Change-Id: I774424bb53c0d24bd49d5fafdfb8f02e9f05ee16 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Add missing emit, found by -Wclazy-incorrect-emitSergio Martins2017-06-061-1/+1
| | | | | | | | | | Change-Id: I3dcdd075ed48dc2674e35adaca920c14d34e9b03 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | 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 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>
* | Merge branch '5.9' into devSean Harmer2017-05-219-5/+24
|\| | | | | | | | | | | | | | | | | | | | | 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
| * 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>
| * Scene2D cleanup - register pick events when scene is initializedAntti Määttä2017-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Merge 5.9 into 5.9.0Oswald Buddenhagen2017-05-041-1/+1
| |\ | | | | | | | | | Change-Id: I02adbc5294f9d5879cb05e75eccad74196ea2a7c
| | * Modify configure to build with no assimpMäättä Antti2017-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add -no-assimp configure to build without assimp. Task-number: QTBUG-60128 Change-Id: I2ca7bb68d3b659e18bd79039beb5cb6623473859 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Use non-template version of QVariant::value (clazy reports)Mike Krus2017-05-021-1/+1
| | | | | | | | | | | | | | | Change-Id: I998507edff792cfbdcdf2e36e29792fab3c734cf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Remove unneeded temporary container (clazy reports)Mike Krus2017-05-021-1/+7
| | | | | | | | | | | | | | | Change-Id: I2a7a94d7b2791382699b39dda1189bc78ce0ff06 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Add missing Q_OBJECT (clazy reports)Mike Krus2017-05-025-0/+5
| |/ | | | | | | | | Change-Id: I0bc49e1b391c610a8f8f649a45391b31f9283302 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add download service and use for remote meshesMike Krus2017-05-208-2/+691
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new QDownloadHelpService. Can be provided with QDownloadRequests which will trigger downloads and return the data in a QByteArray. Downloads are triggered in a separate thread and requests have the opportunity to do long running operations there (it will block other requests though). Implemented for downloading meshes. When the functor is triggered, it checks the url and submits a request for download. When that completes, it’ll save the data in the functor and mark the component as dirty that that a job will run again to complete the parsing. LATER (5.10): - status property, progress maybe Task-number: QTBUG-57614 Change-Id: I05abe9610e12670a368d480b2fb3115987201e6b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-04-178-15/+40
|\| | | | | | | Change-Id: I09ecc95475806ef15e3e57321a20f727dc86314d