summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add changes file for Qt 5.9.7v5.9.7Antti Kokko2018-10-031-0/+20
| | | | | | | | | | + 1dd50a7ba60a9f76ae42b5c00290c33e1902bb35 Bump version + 490b77ac1ffaa6a74f4a8d89bf73764dcdae9188 Mark 3rd-party 'Jet Propulsion Laboratory Photojournal' as examples only + 608de36fd8802b53d028a92b1984c40321435b0a Doc: Use correct module name + 29035a09a4db2fb3d35d8d494b609bb15b0a97f5 Compile with Xcode 9.4 Change-Id: I306ad676cba9c918f6484d06f640bafeff914760 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Compile with Xcode 9.4Andy Shaw2018-08-206-9/+102
| | | | | | | The changes are backported from the assimp 4.1 version Change-Id: I0adee853961ffbbecf1f8212b41d3ec06fd57109 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Doc: Use correct module namePaul Wicking2018-07-302-3/+5
| | | | | | | | | | QML: Importing Qt3D.Scene2D doesn't work, QtQuick.Scene2D does. CPP: Specify header file, as convenience header doesn't exist. Task-number: QTBUG-67370 Change-Id: Ia53e92c076f52bbb81b91370425279c44bf9e3c5 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 9b00bfe82f03ca6d39a004cc380fba144509da2b)
* Mark 3rd-party 'Jet Propulsion Laboratory Photojournal' as examples onlyKai Koehne2018-07-111-0/+1
| | | | | | (cherry picked from commit 974c904270fea2bf53f500794c56ca84324de4d8) Change-Id: Ie7e229f8be0620779733a362236c3a23ac968b29 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge remote-tracking branch 'origin/5.9.6' into 5.9Qt Forward Merge Bot2018-06-131-0/+25
|\ | | | | | | Change-Id: I2da6f90837f92adda457609abef5e7d024694da1
| * Add changes file for Qt 5.9.6v5.9.6Antti Kokko2018-05-311-0/+25
| | | | | | | | | | Change-Id: I8409969e743e993d19af0f94597a4e0d5d017721 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Bump versionOswald Buddenhagen2018-05-311-1/+1
|/ | | | Change-Id: I886773bbce54b20d248945105ac6f54a2188379d
* Doc: Add basic documentation for Scene3D QML modulePaul Wicking2018-04-277-16/+132
| | | | | | | | | | | | Adds Scene3D as QML module. Provides preliminary documentation for Scene3D QML type. Task-number: QTBUG-61651 Task-number: QTBUG-54816 Change-Id: I2811bb2165ca0adde574ddde70fa7185b3c03083 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 988928b9d37dfae08b5a98cd139eaaa14e72c02c)
* Doc: Add note about projectionMatrix effect on projectionType in QMLPaul Wicking2018-04-271-0/+4
| | | | | | | | | | | Replicate information provided in the CPP class to expose the information for readers of QML documentation, as suggested by bug reporter. Task-number: QTBUG-64386 Change-Id: If448e0a54f9c238938a9d930a0a0edcf72efa2aa Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 2831c495233338403b31348393e785055700541b)
* Scene3DRenderer: Do not call windowChanged lambda on destroyed objectOliver Wolff2018-04-241-1/+1
| | | | | | | | | | By passing "this" as connect's third parameter we make sure that the lambda in question is not called on destroyed objects. Task-number: QTBUG-67324 Change-Id: I05c45b2ab7b4c81bbf462587515779cf4ef88232 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 898c11d13a1af0c70fc8d5902bf3da210d6c2faf)
* Merge remote-tracking branch 'origin/5.9.5' into 5.9Qt Forward Merge Bot2018-04-1188-53316/+225552
|\ | | | | | | Change-Id: I2ddaa5d2d588e88acd60b2a9ded175e6bd2325d3
| * Add changes file for Qt 5.9.5v5.9.5Antti Kokko2018-04-041-0/+24
| | | | | | | | | | Change-Id: I8bbd918922e4d9aab0c9fa4b2751de21313fc09b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Add replacement materials exampleSean Harmer2018-04-0486-2347/+212301
| | | | | | | | | | | | | | | | | | | | | | | | | | All texture assets were made by KDAB under the CLA. The material "sphere" mesh is from Allegorithmic and published under the Creative Commons 4 license. See paragraph 1.2 of https://www.allegorithmic.com/legal/substance-share Task-number: QTBUG-61415 Change-Id: I23d61723bbac561e22e11fa57105b29148c01699 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * Replace the toyplane mesh with one created by KDABSean Harmer2018-04-041-50969/+13227
| | | | | | | | | | | | | | Task-number: QTBUG-61415 Change-Id: I4557959c3c1068be5ef977d05a9e0443545ae919 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Bump versionOswald Buddenhagen2018-03-191-1/+1
|/ | | | Change-Id: Ifbe5370e47b5144e878ca0ed9215f195596c16cd
* Fix OnDemand rendering by keeping ComputeDirty from being re-enabledSvenn-Arne Dragly2018-02-142-5/+13
| | | | | | | | | | | | | | | The previous implementation would reset ComputeDirty every frame if markDirty(AllDirty) had been called earlier. This would break the OnDemand rendering policy because every frame would be rendered even if there were no changes or no compute commands in the scene. This change removes the code that would re-enable the ComputeDirty flag every frame and documents that the user must either set the rendering policy to Always or trigger the rendering of a new frame if the rendering policy is set to OnDemand. Change-Id: Ide03a3a49ee1670fd9d67ed47454c6679219765d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove null pointer checkJesus Fernandez2018-02-121-2/+2
| | | | | | | | >>> CID 187918: Null pointer dereferences (REVERSE_INULL) >>> Null-checking "node" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Change-Id: Ic799724e91d118a2c5b2715c5742a4184b09a217 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* ObjGeometryLoader: Fix out of bound errorPaul Lemire2018-02-087-8/+124
| | | | | | | Apparently this was a major security issue reported to security.qt-project.org Change-Id: Id52f035134ca6111e24b5820eb1b64b99449e47f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix crash if sharecontext is requested before initailizationMäättä Antti2018-02-062-34/+42
| | | | | | | | | | | | Scene2D can sometimes receive the render initialization event before the qt3d renderer has been initialized. This causes crash because the sharecontext hasn't been set yet. Add safeguard against this. Task-number: QT3DS-904 Change-Id: Ib50a60ed89c12ac54c9165266466d9804affe77c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix crash in scene2d at shutdownMäättä Antti2018-02-061-5/+8
| | | | | | | | | | | | | | | | | The resource manager policy for scene2d nodes has been changed so the scene2d constructor gets called multiple times at startup. That in turn increments render thread user counter every time. The cleanup code gets called for each instanciated QScene2D node so at shutdown the counter never reaches zero and the render thread is not closed properly. Change the implementation so that the counter gets incremented only when the render thread has been properly initialized. Task-number: QTBUG-66003 Change-Id: I33a5b1f407e65329776bcabe0b66ff049581a435 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Bump versionOswald Buddenhagen2018-02-021-1/+1
| | | | Change-Id: I3e4cd0ca1086953206a5dc32d2721a673b6a8e4a
* Fix array of textures in shader parameterMauro Persano2018-02-028-52/+94
| | | | | | Task-number: QTBUG-61759 Change-Id: I2c61f9cf41124816d10da90783c7fb9ff6088fc4 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Ensure node creation changes are sent before using in list propertiesSean Harmer2018-02-024-2/+112
| | | | | | | | | | | | | | | | This completes the fix for out of order event delivery related to creation changes. We now ensure that QNodes used as values in singular and list properties are fully constructed on the backend before they are referenced in properties of other nodes. Also added a check to not recurse into sending too many changes when adding a child node. Written with Svenn-Arne Dragly. Task-number: Task-number: QTBUG-65956 Change-Id: I1470e0f685c81d1277ac04ad985ec1b76f1c27c0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add test for picking object from multiple directionsMike Krus2018-02-023-0/+198
| | | | | | | | | This would have caught the breakage caused by changing how the camera view matrix was computed Change-Id: I521b7e6c700aeaa1c751cdf0aceb8b8ab66a6af9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Don't compute bounding volumes for patch-based geometryMauro Persano2018-02-011-1/+1
| | | | | | | | | The actual geometry for patch-based geometry renderers is computed in tessellation shaders, so don't try to compute bounding volumes. Task-number: QTBUG-66073 Change-Id: I9ff13c526859020ff85ba84e6db7c4c4b7335974 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Cleanup AssimpImporterPaul Lemire2018-02-012-10/+10
| | | | | | | And improve error output Change-Id: I9364e0e610cc758ad322bf96b52f57989c7ed0df Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Compile failing shaders once only and avoid asserting on failureLaszlo Agocs2018-02-014-10/+33
| | | | | | | | | | | This way a material with a broken shader will fail once (and won't be retried unless the shader code gets changed), and the application will continue gracefully, without asserting. Task-number: QTBUG-65936 Change-Id: I7003e8c6f7d9094280d7757c1020b485f93e3b37 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make PickBoundingVolumeJob depend on ExpandBoundingVolumeJobSvenn-Arne Dragly2018-01-301-0/+1
| | | | | | | | PickBoundingVolumeJob uses QEntity::worldBoundingVolumeWithChildren(), which is set by ExpandBoundingVolumeJob. Change-Id: Ic03360a694254e45c9abfd6863a7b101910bb7fc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Handle 0 stride vertex dataMike Krus2018-01-294-16/+107
| | | | | | | | | | | | | | | All examples, even with packed data, set actual vertex size on the attribute. However, convention is to pass 0 for packed data, in which case GL will compute vertex size based on number of coordinates and component data size. Neither the buffer visitor nor the triangle visitor respected this convention and relied on the real size to be set. Now computing the actual stride if it's passed in as 0. Change-Id: I9a65fd7d8d56f181e31faa93389e3fdd1a973c17 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Revise buffer traversal in bounding volume calculationLaszlo Agocs2018-01-293-66/+278
| | | | | | | | | | | | | Take the index attribute (and buffer) into account, when present. Rely on QGeometryRenderer::vertexCount(), when set. Initially done on dev as: 1d874d33da9174a82fccc266c66a22af006ac8ef Task-number: QTBUG-65590 Change-Id: I98d1865e3581272471d6b93b9633da38dc77163d Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix componentAdded/componentRemoved notifications dispatch to componentsMike Krus2018-01-266-10/+57
| | | | | | | | | | | | | | | | When a component is added to an entity, two change notifications were sent but they both were directed to the entity. This makes sure one message is sent to the entity and one to the component, as was intended. Same for remove notifications. Fixed the unit tests which where incorrectly testing for the subject id of the change notification. Change-Id: Ic697c08e92e884abf28e675e4ae2b44a93ca45d5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Fix grammar glitch in module descriptionsKai Koehne2018-01-262-2/+2
| | | | | Change-Id: I8b519e3d0c5389607be069c08215c921b63e5f07 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Handle multiple surfaces properly for pickingMike Krus2018-01-2613-96/+382
| | | | | | | | | | | | | | | | This fixes issues with picking when having multiple viewports and/or multiple windows. Now check that the mouse event actually hits inside the viewport extents. Also track the source of events and check that the surface matches the source of the event. Remaining issue is overlapping viewports within the same window Task-number: QTBUG-59567 Change-Id: I76a4ee2bec7300d893fef6040d89bf81f2109795 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Add examples and enumeration to QCullFace documentationSvenn-Arne Dragly2018-01-251-4/+69
| | | | | Change-Id: I0196e0305d205b7499c77644c0fdd42eb671a309 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* qardboard: Fix QardboardCamera following viewMatrix changesPaul Lemire2018-01-242-43/+30
| | | | | | | | Bonus: also remove the binding loop on the matrix property that was being reported. Change-Id: I2489a1f7ac5f65b4061ce069796d5afeab1811de Reviewed-by: Mike Krus <mike.krus@kdab.com>
* anaglyph-rendering: Fix StereoCamera following viewMatrix changesPaul Lemire2018-01-241-10/+14
| | | | | Change-Id: I42d0091368914e0f3f8cb76c707d576227d7b5f2 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* multiviewport: Adapt SimpleCamera to viewMatrix changesPaul Lemire2018-01-241-2/+9
| | | | | Change-Id: I3e276e8cd7d754905ed41a80ace19b72eb50175f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix issues due to changes in camera view matrixMike Krus2018-01-245-13/+18
| | | | | | | | | Picking relied on the transform matrix of the camera being the same as the view matrix. This has changed but picking and lod code was not update to use the new convention. Change-Id: I3250d3409d15e78a5c0b56eb3b1e74bce1e22843 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Replace Q_DECL_OVERRIDE with override keywordJesus Fernandez2018-01-231-1/+1
| | | | | Change-Id: I153ff68ac60f88d3db8815e133c8851b05e1c130 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* LoadGeometryJob: fix uninitialized valuePaul Lemire2018-01-221-0/+1
| | | | | Change-Id: Ia70ebeed824cdea7127a7741082c7983c89ec731 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Deprecate viewMatrix() on QCamera because its name is misleadingSvenn-Arne Dragly2018-01-221-0/+2
| | | | | | | | | | | The matrix returned by viewMatrix() is in a coordinate system relative to its parent, which is not the final view matrix used when rendering. The final view matrix depends on the world transform of the camera, but we do not calculate this on the frontend for performance reasons. We therefore deprecate this function because its name is misleading. Change-Id: Ib7891c13d83b4de43b86dde878994f66979ecb02 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Calculate and store real transform of camera in addition to view matrixSvenn-Arne Dragly2018-01-226-25/+318
| | | | | | | | | | | | | | | | | | | | | | | | | We used to store the viewMatrix as returned by QMatrix4x4::lookAt in the transform component of the QCamera. This was unfortunate for two reasons: 1) An arbitrary entity could not be used as a camera without changing its transform to a viewMatrix, which breaks any other use of the entity. 2) Adding entities as children to cameras lead to the wrong transformation. This made it impossible to properly add objects that should be attached to the camera, such as the hands of a character in first-person view. This commit computes the transform of the camera based on the requested position, view center and up vector. The view matrix is calculated when the matrices are updated in the RenderView. This calculation assumes that the view direction is along the entity's negative z-axis and that the up vector is along the y-axis. Change-Id: If22b29e3d38bf55fbf79e9f7baf0c922e0a48aeb Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* AssimpImporter: disable default mirroring on texturesPaul Lemire2018-01-221-0/+1
| | | | | | Change-Id: I8fd5776b44faf36b08f3966f634d656d06b203a4 Task-number: QTBUG-64133 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Merge "Merge remote-tracking branch 'origin/5.9.4' into 5.9" into ↵Liang Qi2018-01-183-9/+47
|\ | | | | | | refs/staging/5.9
| * Merge remote-tracking branch 'origin/5.9.4' into 5.9Liang Qi2018-01-183-9/+47
| |\ | | | | | | | | | Change-Id: I9c8aa5d2010fcc622b9cce3031e58a46b74ea2fa
| | * Scene3DRenderer: ensure window pointer stays the same while renderingv5.9.4Paul Lemire2018-01-102-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears that the pointer value for the window could in some cases be updated meanwhile we were rendering, which resulted in random crashes. We now save the window pointer to a member variable on startup or whenever the windowChanged signal is fired and use a mutex to ensure the pointer won't change while we are rendering. This also covers the case where the item is destroyed but the cross-thread signals are not received before rendering happens. Task-number: QTBUG-63897 Task-number: QTBUG-65407 Change-Id: I5f2797e2210b532f9086ed186959fce27ea9f514 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Add changes file for Qt 5.9.4Antti Kokko2018-01-101-0/+27
| | | | | | | | | | | | | | | Change-Id: I12efac00c0e746f5b4f71bce44a4142f3d42df59 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Add unit test and fix for broken order of event deliverySean Harmer2018-01-182-1/+96
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure a backend node is always created before it is used in a property of any other node. This avoids a race between sending the creation, add child and property update changes and the start of a new Qt 3D frame. The race is caused by the use of the event loop to trigger the node created and child added changes. Also be careful not to repeat the node creation. Task-number: QTBUG-65829 Change-Id: I6ca5eb269ce657f8d42d855550fb4f898e3bd420 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Volker Krause <volker.krause@kdab.com>
* | Scene3D: allow to force blocking renderingPaul Lemire2018-01-168-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using Scene3D, when the jobs preparing the render commands for the 3D scene take too long (more than the QtQuick refresh rate), the Scene3D wouldn't render anything when QtQuick requested it to. Then, the next time it would be asked to render (next QtQuick frame), if the jobs have finished by then, it will render. If the jobs are still not ready, then the above process is repeated. This patch introduces an environment variable SCENE3D_BLOCKING_RENDERMODE which can be set to force Scene3D to wait (for at most 10ms) instead of returning immediately for the jobs being ready. Change-Id: I2db10e622570a7bc8a2e2cbaff113c110135cd3e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Don't insert nullptr shader programs into the shader cacheVolker Krause2018-01-121-1/+2
|/ | | | | | | | This can happen when the shader program fails to compile/link, and will subsequently trigger an assert in the shader cache. Change-Id: I4c4093d89a8a0f5ed1970012258be5efe8ec29c9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>