summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add sceneChangeEvent to QClock backend nodev5.10.0-alpha1Juan José Casafranca2017-09-083-0/+47
| | | | | | | | QClock backend node didn't implement sceneChangeEvent, so there was no communication from frontend to backend node. Change-Id: Idf72cba7b7c1834d80694d28a6df4826f8e279aa Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* New prototypes for QShaderProgramBuilderRenato Araujo Oliveira Filho2017-09-071-0/+135
| | | | | | | | | | | Add new default prototypes that make more flexible for the apps to: Join two elements into one Join three elements into one Join four elements into one Cast an element into another Change-Id: I4544d3a193101a948b7017f2f12bd4f2d49ac892 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Initialize entity id in QPickEventPrivateMauro Persano2017-09-051-0/+1
| | | | | | Change-Id: Ic028e8bcd89c7d360eb088fc0cf7d8256f3948e3 Task-Id: QTBUG-62976 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* QMetalRoughMaterial replaces QTexturedMetalRoughMaterialKevin Ottens2017-09-045-476/+12
| | | | | | | | | This is a complete drop in replacement now, no need to keep code for both. We use inheritance so that properties in QMetalRoughMaterial can be versioned properly. Change-Id: Ia95b40c5abd466fbb20e5b15ca4e6d167fb80ec3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use layers to have only one graph for Metal/RoughKevin Ottens2017-09-048-379/+429
| | | | | | | | | | | | | Both QMetalRoughMaterial and QTexturedMetalRoughMaterial use the same graph now. Also QMetalRoughMaterial does the job to be clever and activate the right layers depending on the type set on the properties (which is why they are now all variants). QMetalRoughMaterial can then be used as a drop in replacement for QTexturedMetalRoughMaterial. Change-Id: Ia52fe4608aca5558642599ed435f3cd9ac93e651 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Implement enabledLayers on ShaderBuilderKevin Ottens2017-09-043-1/+117
| | | | | | | | This is the backend counterpart to the QShaderProgramBuilder introduction of the enabledLayers property. Change-Id: Iecec5e9d1450c454f64c243f5f797c0d63e5f1ee Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Introduce enabled layers to QShaderProgramBuilderKevin Ottens2017-09-044-0/+90
| | | | | | | | This will allow to control the code generation by forwarding this to QShaderGenerator on the backend side. Change-Id: Ic613467ba742c05344ef553eabab861b2408d0ec Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QShaderLanguage to simplify protos and metal/roughKevin Ottens2017-09-043-258/+287
| | | | | | | | | | Thanks to those new enums and their support in the parameters system we can remove quite a few of the prototypes and give more expressivity in the material json files. Change-Id: I10780afca06c1c49e4bb99d90370abdc4c25919e Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Simplify node prototypes JSON using parametersKevin Ottens2017-09-043-261/+179
| | | | | | | | | Thanks to the parameters now being supported in the formats, we can simplify greatly the JSON file to have for instance a single sampleTexture prototype and not one prototype per possible texture name. Change-Id: I28f4f3e856f6cca0bbff579efb983bc13e0ea605 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Extend generateClipFormatIndices() to handle jointIndexSean Harmer2017-09-026-4/+1457
| | | | | | | AnimationClip now matches on name and jointIndex if jointIndex is valid. Change-Id: Id2b3f41bf465a847048537583fc244743c0d026b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Extend QChannel and Channel to support jointIndex membersSean Harmer2017-09-024-0/+19
| | | | | | | Needed for animartion aspect support of skeletons. Change-Id: I89027a62ffcac68318ef8c8645b4720e71ff1697 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Extend checkAssignChannelComponentIndices test to cover indexed targetSean Harmer2017-09-021-0/+29
| | | | | Change-Id: Ic2cd9504c454b96037ce2fcc061b4d38d2f0c2fd Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Extend buildRequiredChannelsAndTypes to handle indexed targetsSean Harmer2017-09-026-6/+118
| | | | | | | | | | | Specifically, this is needed for animating joints of a skeleton. If we later find other such indexed targets we can rename the jointIndex member to something more generic. For now this naming helps with reasoning as there are many kinds of index in play within the animation system. Change-Id: I348f255ee622aa11f26e5a3c1055bf5c12071c17 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Export QSkeletonMapping to QMLSean Harmer2017-09-021-1/+4
| | | | | Change-Id: I5fe5f7e41b49354075f410993bfa51897fde9bce Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Mirror QSkeletonMapping properties to ChannelMapping backend nodeSean Harmer2017-09-024-1/+48
| | | | | Change-Id: Idb6aa59ae65351d8aa8bca31dd68a350bcb46973 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QSkeletonMapping to Qt3DAnimationSean Harmer2017-09-027-2/+470
| | | | | | | Allows to easily map animation channels onto a target QAbstractSkeleton. Change-Id: I53c348fe19e00f7b57653f5525b67920319f83d6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Create backend nodes for any QAbstractChannelMapping subclassSean Harmer2017-09-0210-17/+301
| | | | | | | | | | Introduces a new creation change type to distinguish between the frontend node triggering the creation. Following commits will add the new channel mapping types and populate the backend node appropriately. Change-Id: I09b3cbcd3d716c9e9c18873066b9f282222ab783 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge dev into 5.10Frederik Gladhorn2017-09-0225-197/+217
|\ | | | | | | Change-Id: I1bef655947a7176f7931c7f1b8ed4c4176395451
| * Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-09-0125-197/+217
| |\ | | | | | | | | | Change-Id: Ic4220f9957266c374f751d3612c60b81e9cea193
| | * Don't create GL textures when format is not setMauro Persano2017-08-312-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For textures where the format was not set (this may happen, for instance, for a Texture2D without TextureImage children), don't try to create a GL texture or the underlying OpenGL calls will fail. Also avoid trying to set the corresponding uniform while rendering. Change-Id: I17d95e2a2f1f1a1e5c22a0296c8641c4873e9e7f Task-Id: QTBUG-62654 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * VSyncFrameAdvanceService: don't use timers in unit testsMauro Persano2017-08-311-78/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unit tests for VSyncFrameAdvanceService rely on somewhat strict timing and may fail under certain loads. This patch replaces timers with a semaphore to synchronize between threads. This also makes the unit test closer to actual Qt3D code, where there's a semaphore in the renderer to synchronize render view submissions. Change-Id: Ie328cdee1b3a0c2ad17f02d4f14e57e218556061 Task-Id: QTBUG-62825 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Doc: add missing doc QGeometryNico Vertriest2017-08-301-0/+18
| | | | | | | | | | | | | | | Change-Id: I9d1fef3f793f9d3eb4ef0bb3fff356539fc03e2c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Doc: add doc to undocumented methods/propertiesNico Vertriest2017-08-304-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | qmorphphongmaterial.h:57: warning: No documentation for 'Qt3DExtras::QMorphPhongMaterial::interpolator' qextrudedtextmesh.cpp: No documentation for 'Qt3DExtras::QExtrudedTextMesh::depth', ::font and ::text qextrudedtextgeometry.h:79: warning: No documentation for 'Qt3DExtras::QExtrudedTextGeometry::indexAttribute', ::normalAttribute and ::text Change-Id: Ib6bb0310be3b9e3a735bb90194a79dfb295c258b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Fix hover event handlingMike Krus2017-08-301-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | HoverMove is not a QMouseEvent. So we generate a fake one and send it for picking processing. Task-number: QTBUG-58607 Change-Id: Iaa06bfe49494db1a46cc021747fd5d0026330525 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * Doc: add doc to undocumented methods qt3dNico Vertriest2017-08-294-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qabstractlight.h:65: warning: No documentation for 'Qt3DRender::QAbstractLight::Type' qspotlight.h:64: warning: No documentation for 'Qt3DRender::QSpotLight::attenuation()' qshaderprogram.h:78: warning: No documentation for 'Qt3DRender::QShaderProgram::Status' qshaderprogram.h:121: warning: No documentation for 'Qt3DRender::QShaderProgram::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change)' qpicktriangleevent.h:57: warning: No documentation for 'Qt3DRender::QPickTriangleEvent::uvw' Change-Id: Iedb73cc73bc28a5e9dd3498a0bb6547eb1a96ffc Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Doc: add doc to undocumented methods/propertiesNico Vertriest2017-08-284-1/+10
| | | | | | | | | | | | | | | | | | Change-Id: I8967110b0237421299c2103f847a38e0526f9a6b Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * QMouseHandler: Add a parent to the internal timerGuilhem Vallat2017-08-252-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Without it the timer is leaked and doesn't follow the mouse handler when move from a thread to another. Task-number: QTBUG-62779 Change-Id: I34afc36165d2bbbce626d6c2c74f9408a319a7cb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Fix shader linking error on RPI/BRCMSergio Martins2017-08-251-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | QOpenGLShader::link: ERROR:OPTIMIZER-3 (fragment shader, line 46) Support for for loops is restricted : right side of condition expression must be constant Task-number: QTBUG-59349 Change-Id: Id5806e597642e0805ef02fa1804ec4a9a8e4338c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Don't dereference null vaoSergio Martins2017-08-251-2/+4
| | | | | | | | | | | | | | | | | | | | | RPI doesn't support vao Change-Id: Icfcf90c6aff53a73704cc36c215b7b452be86778 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Fix crash when loading multiple assimp scenesMauro Persano2017-08-242-84/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a second scene is parsed, the importer for the first scene is destroyed, and geometry renderers and materials in the parser's maps are released, causing a crash. Instead of converting all meshes and materials to Qt3D entities ahead of time and storing them in maps, only convert entities that are needed by the scene. Task-number: QTBUG-62390 Change-Id: I1261d0dd01ced43b2731fdfe97b97885883dca9b Reviewed-by: Massimo Callegari <massimocallegari@yahoo.it> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
| | * Remove ill-timed viewVec-upVec check in QCameraLaszlo Agocs2017-08-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The check for parallel view and up vectors is well-intentioned, but it cannot be done this way: the view matrix is updated already after setting any of position, view center, or up vector. The (failing) check can thus be triggered right after setting a position or view center that (temporarily) results in a vector colinear to the (not yet final) up vector. Change-Id: I083200bf05582517880a88816b7987874810c2bb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Doc: add doc to undocumented methods qskyboxentity.cppNico Vertriest2017-08-211-1/+16
| | | | | | | | | | | | | | | | | | Change-Id: I3056be52f9203fbd99a3e5c01de71d79bafd2298 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | | Alter QChannelMapping to accept QAbstractChannelMapping pointersSean Harmer2017-08-315-27/+27
| | | | | | | | | | | | | | | | | | | | | In preparation for the new mapping subclasses. Change-Id: I3d659b350da72cca9f5ad195f7aa7fea3d943810 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Introduce QAbstractChannelMappingSean Harmer2017-08-317-9/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will act as the base class for the various specific use cases: * QChannelMapping for mapping to ordinary QNode properties * QSkeletonMapping for mapping to indexed joints in a skeleton * QCallbackMapping for calling a callback in response to an animation The last two of these are yet to be added. The final one is currently part of QChannelMapping but will be separated from it. All 3 types can map to the same type ChannelMapping backend node. Change-Id: Iaeeba0919628d8da4479b8569d3b10d9b5faccf4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Fix signed vs unsigned comparison warning in unit testSean Harmer2017-08-301-2/+2
| | | | | | | | | | | | | | | Change-Id: I9c6b3a31daeb1ea133e01b5dd9cd071dd6685487 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Remove duplicate SUBDIRS entry from manual testsSean Harmer2017-08-301-2/+1
| | | | | | | | | | | | | | | Change-Id: I6f3de6e15a77695fea0cea1bc38ffc7c21607897 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Send joint names and local poses from render to animation aspectSean Harmer2017-08-308-4/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Factor out local poses into their own vectorSean Harmer2017-08-306-33/+55
| | | | | | | | | | | | | | | | | | | | | | | | To make it easier and more efficient to send all the local poses for a skeleton between aspects. Change-Id: I68bf374a7d466f606f8979fdbf84cb697a47a8a7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Add name property to QJointSean Harmer2017-08-307-13/+54
| | | | | | | | | | | | | | | | | | | | | And set it from the backend when creating frontend joints. Change-Id: I26d37c7f516944eb353af38716aab4c55bd2f79f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Store joint names in their own vectorSean Harmer2017-08-304-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the JointInfo vector smaller (better cache performance) and also makes it cheaper to pass the joint names over to the animation aspect in a following commit. Change-Id: I1a892c1639dc055757906179d2fab89aad5fa81c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Add Skeleton backend node to the animation aspectSean Harmer2017-08-308-3/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The animation aspect can already animate any property of a QNode subclass. However, the render aspect allows to render a skinned mesh utilising a QSkeletonLoader that does not create the corresponding frontend QJoint objects (subclasses of QNode). Some skeletons can be large (10's or 100's of joints) so this is a good memory conserving optimization. The consequence of not creating the frontend joints however, is that without the QNodes to address, we cannot animate their local poses. To combat this without giving up on the above optimization we add a backend node for QAbstractSkeleton to the animation aspect. This node contains a vector of local poses for the joints in the same order as the render aspect creates and flattens the joint hierarchy in (see the vector of JointInfo in the SkeletonData in the render aspect). The animation aspect can then use this special knowledge to efficiently animate the joints of a skeleton and each frame, inform the render aspect backend of the new set of local pose transformations, prior to the render aspect calculating the skinning matrix palette and supplying that to the armature component for rendering. This will require the animation aspect to be able to map channels in an animation onto the joint indices of the skeleton backend nodes. By default, they will be applied to matching indices in the vector of local poses. However, an optional name property will be allowed in the animation clip channels to permit re-mapping of animation clips to similar skeletons (i.e. allow animations to be reused between different skeletons where they share some joint names). This will be done in follow up commits. Change-Id: I81ad258f59bb0ddd6a49456840c860783f6fb340 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Re-enable the QQmlType code paths in the node factoriesSean Harmer2017-08-2512-27/+13
|/ / | | | | | | | | Change-Id: Ieacfbfb25de4840d7c428f89cd1f7d178852036e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove alignment tests that should not be present yetSean Harmer2017-08-252-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When splitting the SIMD series, commits 0f1586e66d21af972caf353ad90f29b43721921b and e881d3ca08da399640ca310ec9f8e1c71aefe352 accidentally included tests for memory alignment before the custom operator new functions were added that ensure alignment. This obviously fails sometimes when the default operator new happens to not align the memory as the test expects, leading to crashes. This commit removes the tests. They will be readded along with the commit that introduces the custom operator new for the SIMD enabled types. Task-number: QTBUG-62781 Change-Id: I30cd88019cd7aef96b022530b81c3b46cd249207 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | BlitFramebuffer framegraph nodeJuan José Casafranca2017-08-2343-6/+1939
| | | | | | | | | | | | | | | | This node allows to copy the content from one FBO to another or to screen Task-number: QTBUG-58162 Change-Id: I6016c46d9d538a012c2f641116ed766dd70ad021 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Don't call deprecated QImage::byteSize() functionSean Harmer2017-08-222-2/+2
| | | | | | | | | | Change-Id: Ib2c1150e4612b378e5b04d0ea424f38af2c434c2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Only execute QFrameAction job if there are actionsJan Marker2017-08-223-1/+10
| | | | | | | | | | Change-Id: Ie90d686a1161d487777cbdf758a276e34134653f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | RenderQueue: make it hold its mutexPaul Lemire2017-08-226-22/+13
| | | | | | | | | | | | | | Allows to slightly clean up the renderer and remove things from the past. Change-Id: I04da9c4f9039df0de22e4da1dbd9193741e92a4d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | tst_graphicsapifilter: register signals typePaul Lemire2017-08-221-0/+7
| | | | | | | | | | | | | | | | This prevents warnings in the test and ensures the signal spies listen for the correct signals Change-Id: I3eecb3015ec39e1d01c319a436885bd4210405c1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge branch '5.9' into devSean Harmer2017-08-19116-363/+2483
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Complete QML documentation for QAxisAccumulatorPaul Lemire2017-08-181-0/+18
| | | | | | | | | | | | Change-Id: I839196116a5b4d70fa0545c0c6fd28079efeebca Task-number: QTBUG-61993 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>