summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add changes file for Qt 5.9.2v5.9.25.9.2Antti Kokko2017-09-281-0/+39
| | | | | Change-Id: I87e8292ee606af33f729e2b492a616325a49c89a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make m_pressAndHoldTimer into a raw pointer to avoid deleting it twiceSvenn-Arne Dragly2017-09-282-2/+2
| | | | | | | | | | | The timer is parented to the QMouseHandler (introduced in 595b4add0ce6f32bb8ffc56b3a59e6e5bf0b000a) and was therefore deleted both by the parent and by the QScopedPointer, leading to crash on exit. This commit removes the QScopedPointer and uses a raw pointer instead. Task-number: QTBUG-63462 Change-Id: I6b031caf7cb69ccbde74995661f4ce8c73f21d88 Reviewed-by: Sean Harmer <sean.harmer@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>
* 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>
* Fix logic errorLars Knoll2017-09-091-1/+1
| | | | | | | | | This should be removeAll instead of remove(). Remove takes an integer (index into the array). It compiles by chance (but doesn't do the right thing), as QHandle has a cast operator to int. Change-Id: If8d59a535021bab3d2553f83bef7cf769c738dd6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make GLTexture dirty flags atomic instead of using a mutexWieland Hagen2017-09-082-21/+33
| | | | | | | | | | | | | The mutex right now is used for controlling access to the m_dirty flags, and for guarding access to m_gl and other data. We don't need to use it for accessing the flags, as an atomic int will do just fine and relieve us of potential deadlocks. The mutex must only guard changes to the actual data. Task-number: QTBUG-61130 Change-Id: Ia1f25af2233387f375c077965e901c67f972f1ec Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Re-build Blend-Trees when Clips have been loadedWieland Hagen2017-09-088-1/+61
| | | | | | | | | | | | | | | We need to notify the BlendedClipAnimators, when any of the clips it depends on have been loaded. So we register each animator at the clips that it depends on, mark the animator dirty when the clip has been loaded and thus trigger a re-run of the BuildBlendTreesJob. Make sure to guard accesses to the Handler via mutexes, because backend objects can be marked dirty from various threads. Task-number: QTBUG-61941 Change-Id: I4890d0d76d3118538537252f920d9477bed8f934 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Qt3DQuickWindow: Instantiate QQmlAspectEngine after aspectsWieland Hagen2017-09-081-1/+1
| | | | | | | | | | | | | | | If not, some aspect's library might not have been loaded yet, when the QQmlAspectEngine is created. This means that their static aspect registration code will not have been run, causing the QAspectFactory to not include it in the defaultAspects when it is created. Following calls to QQmlAspectEngine::registerAspect() will fail, because the engine was created too early. Change-Id: I96dc8a972dc4fbd1cf3a8d2d91067d59e0d72e57 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Properly handle byte strideWieland Hagen2017-09-081-1/+1
| | | | | | | | If a specific byte stride is given by the user, we should expect that he knows how the buffers look. Change-Id: I0ee9a92bf628d3f3fda935e9cd83e7c1150cd089 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Return the Uniform as a const reference to avoid expensive copiesLars Knoll2017-09-062-12/+2
| | | | | | | And inline the nameId() and uniform() getters. Change-Id: I4c30a6fa36a6e5a7e621d3fad91d88adfcfda185 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix StringToInt implementationLars Knoll2017-09-062-47/+19
| | | | | | | | | | | | Reduces the overhead per call of lookupId() from around 7000 to 180 instructions for a use case. Should in general scale much better. I still do not like that this is using global static data that is never cleaned up. It should be tied at the minimum to the lifetime of the Qt 3D scene. Change-Id: I777a2bbf2d765f4b0fc9e3d2b06692c7260f5a9f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Improve performance of FilterKey comparisonSvenn-Arne Dragly2017-09-062-14/+10
| | | | | | | Reduce the number of copies and make sure the types are compared first. Change-Id: I6bdd411b6e16ef0f92a32de9733d737aab73835b 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>
* GraphicsHelperGL2: Remember to set raw byte sizeKevin Ottens2017-09-062-0/+31
| | | | | | | | | | | If one ended up with this helper then the applyUniform would lead to a divide by zero for any type. As a side-effect, the support for more matrix types needed to be done for unit tests to keep passing. Change-Id: I66c8a2eb7e5617f2fed96c689cb4ebc024ef9853 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* 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>
* 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>
* Fix qml signal documentation for QObjectPickerPaul Lemire2017-08-181-35/+62
| | | | | | | | Also align everything properly Change-Id: I7948670912f3d321829ee1af90ebcb2497b6f98f Task-number: QTBUG-61996 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix qml signal documentation for QMouseHandlerPaul Lemire2017-08-181-25/+49
| | | | | | | | Also align everything properly Change-Id: I65d4ed2646ed69a5037f9e8bca3c6ade6f7199b8 Task-number: QTBUG-61997 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: add missing QGeometryRenderer Lines primitive typeMassimo Callegari2017-08-161-0/+1
| | | | | Change-Id: Id9b03475181ef28dbee7d51d5ef3f7671f815343 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix Quick3DNode factories following QQmlType changesPaul Lemire2017-08-1610-27/+15
| | | | | Change-Id: I333485024f4c5534d8f2bf6ee301ba52638e6126 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* VSyncFrameAdvanceService: fix Scene3D renderingPaul Lemire2017-08-115-7/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | When rendering with Scene3D it could be that doRender() is called a lot more times than the speed at which the Qt3D simulation loop is running (this happens when resizing the window) This results in vsyncFrameAdvance->proceedToNextFrame() being called while the simulation isn't in a waiting state (simulation loop not yet blocking on vsyncFrameAdvance->waitForNextFrame()). This means that when the simulation loop finally unlocks, it would be able to make several loops for a given frame. Obviously this is really dangerous as the simulation loop drives the synching of changes and this could result in the data being prepared by the render jobs and the actual data in the managers to be corrupt. To fix that, vsyncFrameAdvance->waitForNextFrame() now acquires all available resources + 1 to cope with proceedToNextFrame being called more than once. Obviously this doesn't happen when Qt3D drives the rendering and the VSyncFrameAdvanceService was adjusted to have different behaviors depending on whether we are rendering with Scene3D or not. Change-Id: I495779571256d132fa7e1b3b31114f737de35a71 Task-number: QTBUG-60613 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: add doc to undocumented methodsNico Vertriest2017-08-112-0/+22
| | | | | | | | - qtext2dentity.cpp - qabstractphysicaldevice.cpp Change-Id: I026ac031c366c979e17667c3635c1a391a5bba8a Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: correct declaration qml propertiesNico Vertriest2017-08-113-8/+6
| | | | | | | | | | qadditiveclipblend.cpp:173: warning: Unrecognizable QML module/component qualifier for AbstractClipBlendNode baseClip qadditiveclipblend.cpp:191: warning: Unrecognizable QML module/component qualifier for AbstractClipBlendNode additiveClip qblendedclipanimator.cpp:276: warning: Unrecognizable QML module/component qualifier for AbstractClipBlendNode blendTree qclipanimator.cpp:124: warning: Unrecognizable QML module/component qualifier for AbstractAnimationClip clip Change-Id: Ic761f75986e41dc4ec7ab9e97e6776e49498f870 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Fix Qt3D.Animation version in documentationTasuku Suzuki2017-08-042-3/+3
| | | | | | | Qt3D.Animation only supports version 2.9 Change-Id: Ib300af05412e748384f988a930d14e650da6d701 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Implement property updates for QStencilTest and QStencilOperationWieland Hagen2017-08-036-30/+128
| | | | | | | | Make sure to catch all changed signals from the arguments classes and re-send the arguments to the backend. Change-Id: I0a5e2f42fce4c5ff81489d8a66ad277aa607db0c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix QAlphaMask and QStencilMask render states property updatingWieland Hagen2017-08-033-1/+10
| | | | | Change-Id: Ie11ce88441a6d287d50d1cb78365a65b2742a502 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add QRenderState unit testWieland Hagen2017-08-034-1/+314
| | | | | | | Backend nodes should receive frontend proeperty changes Change-Id: I19ba70d08de833aab467a51d5b21553f0b602ec6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Disable QQmlType codepathsPaul Lemire2017-08-035-0/+10
| | | | | | | Will allow to update the qt5.git configuration without breaking the CI Change-Id: I16d7e2af9da935d4d31f5909575c8edec4a9432e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add private module qt3dcoretestSean Harmer2017-08-037-0/+366
| | | | | | | | Static library containing helpers for unit tests to avoid having to build the same files 200 times. Change-Id: I89d63abbd7777a96276154298c2748e2d6774514 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: fix minor link issueNico Vertriest2017-08-031-1/+1
| | | | | | | qlevelofdetail.cpp:270: warning: Can't link to Qt3dRender::QLevelOfDetailBoundingSphere Change-Id: I29b023f5a2c60a62dd7bdacf63182649dd947059 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix compilation on linux with -qt3d-profile-jobsPaul Lemire2017-08-031-0/+1
| | | | | Change-Id: Iebecab6fa362bb6bda4ee720cb0259214ced52a4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix deferred-renderer-qml lightingWieland Hagen2017-08-024-63/+119
| | | | | | | | | | | | | | The lights must be part of entities that are actually included in the final scene effect layer. So the light world positions have to be forwarded from the actual scene entities to some "dummy" light entities that exist just for the final scene effect render step. Also correct model / modelNormal matrices must be used for global normal/position calculation in the GBuffer render step. Task-number: QTBUG-46707 Change-Id: I380d2e2ecb008ab0606dcd36cd5d98dd1ec41ba6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>