summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.9' into ↵v5.15.9-lts-lgpl5.15Tarja Sundqvist2023-03-236-795/+70
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I23c3c668f84eb2ef9108a217fa85185b6422402b
| * Blacklist: test cases blacklisted in tst_GraphicsHelperGL4:CI Insignificant Platforms Monitor Bot2022-03-081-0/+4
| | | | | | | | | | | | | | | | - bindFrameBufferAttachment on ubuntu-20 Task-number: QTBUG-101556 Change-Id: I7e1b97ec45c08507c147a7663e5e9751682b22d9 Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
| * tst_qchangearbiter: remove tests for message based synchingPaul Lemire2022-02-072-786/+26
| | | | | | | | | | | | | | | | | | Since 5.14, we are not relying on messages to sync nodes but rather calling the BackendNode::syncFromFrontEnd when a sync is needed. Change-Id: I556519f1f17714457ce610c667660f9ccc1e8e06 Task-number: QTBUG-98421 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * Scene3DView: fix shutdown crashPaul Lemire2022-02-032-8/+39
| | | | | | | | | | | | | | | | | | | | | | | | By using a QPointer to whatch whether the Entity was already destroyed. Also had a ownsEntity property to control whether Scene3DView should own the Entity ptr or not. Patch provided by my colleague Tobias Koenig <tobias.koenig@kdab.com> Change-Id: Ideb0e842419df73c8e1bc0608965859750195ca7 Task-number: QTBUG-85575 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Bump versionTarja Sundqvist2021-12-311-1/+1
| |
| * Update Assimp qt_attributions following reuse of qtquick3d assimp submodulePaul Lemire2021-12-272-190/+16
| | | | | | | | | | | | | | | | Change-Id: Ib32b4fcf50b135b012d6c4da4e9f68dad1b4936a Task-number: QTBUG-99414 Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io> (cherry picked from commit a96a379a6aeac867413330026a78ff71c19d34dc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into ↵v5.15.8-lts-lgplTarja Sundqvist2022-11-10597-242966/+559
|\ \ | | | | | | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I503a36099765acfde0a14df04c8215b055121fa5
| * | Update Assimp qt_attributions following reuse of qtquick3d assimp submodulePaul Lemire2021-12-272-190/+16
| |/ | | | | | | | | | | | | Change-Id: Ib32b4fcf50b135b012d6c4da4e9f68dad1b4936a Task-number: QTBUG-99414 Pick-to: 5.15 Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io>
| * tst_qchangearbiter: fix failures on Ubuntu 20.04 CI nodePaul Lemire2021-12-071-3/+3
| | | | | | | | | | | | | | | | Change-Id: I618ef8906c384474756d32ba9b427aa33782cbdf Task-number: QTBUG-98421 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Heikki Halmet <heikki.halmet@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| * OpenGL renderer: restore surface on context when shutting downPaul Lemire2021-11-301-27/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a QQuickWidget and Qt3D, on shutdown and assert occurs. This is the result of the QQuickWidget expecting the surface on the context to be its own internal surface after the QQuickRenderControl has been invalidated. This conflict with what Qt3D does on shutdown as it makes the context current on its own internal offscreen surface on shutdown. Therefore, to fix this issue, we record the surface in use before Qt3D shuts down and we make the context current on it after Qt3D has shutdown. Arguably, the fix should really go in QQuickWidgetPrivate::invalidateRenderControl where the QQuickWidget should check that the current surface is indeed the one it expects and set it accordingly. Change-Id: I534dc330a30a2ad5d17a6416715d03206ef4b1c9 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 559d77cacf7a3f6a29d3debec6d61a2ef8a59dc9) Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Revert "AnimationClip: fix the way we compute the duration"Paul Lemire2021-11-291-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Turns out we want the global clip duration and not the relative clip duration. Therefore global clip duration is always computed from 0. If the first keyframe is offset, then this means animation does nothing until t=offset. This reverts commit 7b23cb1ca5b32fcf24f889e79cec756786f86233. Change-Id: Ic045a3cdea5eac4b8e35b75737e3ae6f00b9fa20 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 98599ddee4761cf1970a97737293f5f627f3f61a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Build Assimp using submoduleMike Krus2021-11-26582-242734/+458
| | | | | | | | | | | | | | | | | | Use same submodule as QtQuick3D Change-Id: I0c138d1cbf5ff545438a7673ccb71a2236729377 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit ad238237b73a70867554d84b3c1762da637c210d) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * OpenGL: Fix content not updated when using OnDemand and switching texturesPaul Lemire2021-11-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When changing a Parameter whose value is a texture, it takes Qt3D potentially two frames to process the scene fully before it is able to draw the updated content. This patch makes it so that if we know we have the flags ParametersDirty for frame N, we request to reprocess the scene once more on frame N+1. Change-Id: Ia635e324434f92f8423a68b72d99350d96830de6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> (cherry picked from commit 672da697b147f039effbfd352b20f3f1891f31c6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * AnimationClip: fix the way we compute the durationPaul Lemire2021-11-241-5/+8
| | | | | | | | | | | | | | | | | | | | We wrongly assumed the start time of a clip was always 0. In practice this might not be the case. Therefore, we now compute duration as tEnd - tStart. Change-Id: I13ca860f3366c2aba5e978cb0c955e7bb2e7bc39 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> (cherry picked from commit 7b23cb1ca5b32fcf24f889e79cec756786f86233) Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * QGeometryFactory: don't make op== virtualMarc Mutz2021-11-186-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That's too clever, and it backfires with compilation errors in C++20 mode: qt3d/tests/auto/render/meshfunctors/tst_meshfunctors.cpp:129:29: error: ambiguous overload for ‘operator==’ (operand types are ‘MeshFunctorA’ and ‘MeshFunctorB’) 129 | QVERIFY(!(*functorA == *functorB)); | ~~~~~~~~~ ^~ ~~~~~~~~~ | | | | MeshFunctorA MeshFunctorB qt3d/tests/auto/render/meshfunctors/tst_meshfunctors.cpp:72:10: note: candidate: ‘virtual bool MeshFunctorB::operator==(const Qt3DCore::QGeometryFactory&) const’ (reversed) 72 | bool operator ==(const Qt3DCore::QGeometryFactory &other) const override | ^~~~~~~~ qt3d/tests/auto/render/meshfunctors/tst_meshfunctors.cpp:50:10: note: candidate: ‘virtual bool MeshFunctorA::operator==(const Qt3DCore::QGeometryFactory&) const’ 50 | bool operator ==(const Qt3DCore::QGeometryFactory &other) const override | ^~~~~~~~ Fix by providing a symmetric operator== for QGeometryFactory that delegates to a virtual equals() method. Change-Id: I23d29ad1b16075629132f2b4757c5810d5615a36 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit ec291f9974ba6d25148955a0b9e55b30c589a9be) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Bump versionTarja Sundqvist2021-11-081-1/+1
| |
| * ComputeCommand: call markDirty(ComputeDirty) when enabled changesPaul Lemire2021-11-032-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using Manual run mode on a QComputeCommand, we rely on the enabled property changing to enable/disable the backend ComputeCommand for a given set of frames. Since we weren't setting any dirty flag when the enabled property changed, Qt 3D was not rebuilding the list of active compute commands but rather using the one stored in its cache. This resulted in the ComputeCommand, now disabled, to still be called for execution until something else triggered a command rebuild. The renderer calls ComputeDirty after it has executed a compute call. This explains why eventually we only had 2 calls (and not a perpetual loop) when calling trigger(1). One was the valid call, followed by the invalid one (and then the command list got rebuilt because of the ComputeDirty flag set by the renderer). Task-number: QTBUG-86493 Change-Id: I7b31606a03609dc13294256b1dac89ee86730ba1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> (cherry picked from commit 3d4ac623d444bbbaddc7f63163b204f6c6a55cab) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * ObjectPicker: markDirty(AllDirty) when we change the enabled propertyPaul Lemire2021-11-031-2/+7
| | | | | | | | | | | | | | | | | | | | Otherwise we would simply change it internally but this wouldn't lead to any actual changes in how we handle pick events. Change-Id: I71aedc74db538978a939620d053af3167fd67dc4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> (cherry picked from commit d32ff6b43b92474de495c88783a67b0b30211a7c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.7' into ↵v5.15.7-lts-lgplTarja Sundqvist2022-09-121-1/+1
|\ \ | |/ | | | | | | | | tqtc/lts-5.15-opensource Change-Id: Iddeea3a673175db4002d71606e9615f173a7041e
| * Bump versionTarja Sundqvist2021-09-071-1/+1
| | | | | | | | Change-Id: Ifabe38ddc569b5dcea6e12ef623d9094e4edaa12
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.6' into ↵v5.15.6-lts-lgplTarja Sundqvist2022-08-1622-115/+948
|\ \ | |/ | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I78ddafff7a563a17c7e9ce31249faf05dc6cda69
| * Picking: reuse LayerFilterJob to perform layer filteringPaul Lemire2021-08-0911-98/+632
| | | | | | | | | | | | | | | | | | | | | | This fixes picking for cases where multiple LayerFilters using different filter modes are present in the FrameGraph. This also reduces code duplication. Change-Id: I19d0c2c5777930820ab950cbf2bfe08ef7d2484f Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 406ea4134444a05dd89f215b3144181c0b0ce924) Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Add missing sampler types and sizes to gl4 helpersJim Albamont2021-08-041-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular the CubeMapArray and CubeMapArrayShadow were missing from the call to get uniform size causing a crash when these sampler types were used. While fixing this, I double-checked the samplers types in uniformByteSize uniformTypeFromGLType buildUniformBuffer and made sure they were consistent Change-Id: Ief91952fd7727945ba1c4156fe053587a4060684 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit e09188f773ab287dd8c4569a1996d89113bfd5d7)
| * Trigger an update on the quick window when creating a render aspectSean Harmer2021-08-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes if a scene is large there is a timing issue that prevents Qt Quick from knowing it needs to do an update. When creating a new RenderAspect give the QQuickWindow a nudge to force an update. Change-Id: Id0bd597ac8845ec5d9c89c7aa00ad57ae6b0056d Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit df63c58ce6872d5b0c62bf34763ac7c093437a81) Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Render enough frames to flush the Qt3D pipeline when dirtySean Harmer2021-08-042-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes Qt3D needs 2 frames if it involves introspecting and then compiling shaders. So render at least this many frames when needed. The change in formatting is pushed upon us by the clang-format use in the pre-commit hook. Change-Id: Ie9f48876351a8d1a7bd0df705a9e43831753ac69 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit c2f6cfd0e4c382045a3391dd20809d9bd3b04311) Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Fix for QShaderNode fix that selected highest version number of a rulePaul Lemire2021-08-032-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | The rule selection still has to be made from last added rule to first so that format.support works correctly. - Update QShaderNode unit tests Change-Id: I47af898ee0d82e91009efccf1dca9937feaca717 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 21168905a7eda8806543b490a0fae5a5a0ec7cad) Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * CameraLens: use ParametersDirty rather than AllDirtyPaul Lemire2021-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | AllDirty would force a lot of recomputations that aren't needed. When the CameraLens changes the only things we need to do are: - update projection matrix in the shader and the frustum culling Those things are performed in the RenderCommand update stage which is triggered with ParametersDirty Change-Id: I27241f3ec323182b19fca7e5528d851680eeec8c Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit ca43cd97277132341676d10a515419a5390c9292) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Rerun bounding volume update jobs when entity enabled property changesPaul Lemire2021-07-302-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, this results in the bounding volume being out of sync with entities (an entity initially disabled that gets enabled would have an empty bounding volume) until some other events in the scene triggers a rebuild. Task-number: QTBUG-93035 Change-Id: Ia21eec0eb5601169e1789321080803a5aed12e82 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit d29f3b277d0f949f2fa0b0e0214e38ec3e790c40) Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Fix multi-view pickingMike Krus2021-06-157-4/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using Scene3DView, qt3d still has a single scene graph and and a single framegraph. It automatically creates layers and layer filters to make sure the right objects are only rendered in the right view. This affects picking though as it was not aware of layer filters. This patch collects the filtered layers for each view and makes sure only entities matching those layers are tested for picking (this uses code that existed for ray casting). This changes the behavior of Qt3D though as non rendered objects (ie, excluded by layer filtering) are no longer pickable. Only way now would be to provide a shader that just discarded everything. Note: Scene3DView is not available in Qt6 so on this branch this only really affects custom scenes with multiple views each showing different content. [ChangeLog] Non rendered entities (due to layer filtering) are no longer pickable Ticket-number: QTBUG-94214 Change-Id: I8515368e43342b33ac219dff533e92efa72fbe7d Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit d79376732105dea749e71cdb114251084c7138a9) Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * Don't export QKeyFrame which is fully implemented in the headerPaul Lemire2021-06-101-1/+1
| | | | | | | | | | | | | | | | | | This otherwise leads to inconsistent dll linkage warnigns on windows. Change-Id: I4f32f2fd2cc45939187535b8232172b280df7316 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 9d17891737befa4645ffd1e1a1153c314366e059) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Bump versionTarja Sundqvist2021-06-071-1/+1
| |
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.5' into ↵v5.15.5-lts-lgplTarja Sundqvist2022-05-164-2/+22
|\ \ | |/ | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I944b4bd889244483ec8d8cc7bafe1fb27b5d00db
| * Bump versionTarja Sundqvist2021-05-201-1/+1
| | | | | | | | Change-Id: I3fc91c1aa65f3a99a499cfe35d15e64aa4231d46
| * ObjectPicker: ensure pristine pickers are handledNicolas Guichard2021-05-062-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | When adding a QObjectPicker component to a QEntity, the object couldn't actually be picked until one of hoverEnabled, dragEnabled or priority changed. This fixes the issue by ensuring notifyJob is called at least once, when the picker is initialized. Change-Id: I5b035cf5be6ef1da35c2d24cf76bc2daaad9bc57 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 1641eae01636ddb82b668c4f91d2c26f89e5bc06)
| * Fix call to drawBuffers in SubmissionContextMauro Persano2021-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Implementations of GraphicsHelperInterface::drawBuffers expect an array of zero-based attachment point indexes (GL_COLOR_ATTACHMENT0 is added to the indexes internally), so we can't convert the attachment index to an OpenGL enum before calling drawBuffers. Change-Id: Ibc8af9f7c402b055c5391ad673b815c1fb65a40a Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 0157b93098fb5339cfe8fe99a111cf6e6f047565) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.4' into ↵v5.15.4-lts-lgplTarja Sundqvist2022-04-072-2/+2
|\ \ | |/ | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I5e53a0ce3558d6cca7f2a63f0ef43c2e1041b8b6
| * Restore ObjectLevelLockingPolicy on ShaderManagerPaul Lemire2021-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We are hitting a race condition otherwise. This is likely due to the fact that removing the shaders is done only once we have unloaded them from the graphics API which technically could happen in a separate thread than the scenegraph thread when running with Scene3D. Change-Id: Ic914f3b305bf807081294a90250413a5d263f124 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit a536039d102f911677e5efec03cc6f3d701aceac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Bump versionJani Heikkinen2021-03-031-1/+1
| | | | | | | | Change-Id: I9b0179a127d6ff17d9739c755ae6c613aa11b6c6
* | Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-231563-31114/+31114
|/ | | | | | | | | | | This reverts commit 03e5f60e585701608c1181365faee484d7a1f14c. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I359e89ed77b1b2750607617d138ebb6c316f0296 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix light uniforms not properly being updatedPaul Lemire2021-02-032-1/+8
| | | | | | | | | | | | | | | | | | | - We cache commands and only rebuild them when really needed. When we rebuild then, we also store the mapping between uniform location and parameter name - When reusing a command, we only update the uniform values but expect the mapping between to remain the same. - When dealing with lights however, we can end up in a case where the light type changes, and therefore so does the shader data associated. The command remains cached as nothing really requires a rebuid. Yet, this means we could have more or less parameters than the number of mappings we have stored previously if the shader data defines more or less properties. To account for this, we now rebuild the mapping when building the command or if the number of parameters in the parameter pack is different than at the previous frame. Change-Id: I9400fc7e5bcb4b97ac9da69cdf794010cf81103b Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit a7f627b29b2792154bc2a45f31bd32b74fd508b4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update commercial license headersTarja Sundqvist2021-02-021563-31114/+31114
| | | | | | | | | | | | | | | | Updated header.COMM to the files in tqtc-qt3d. Examples, documentation files or tests are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4155 Change-Id: I139c8ad72c042b0900239decc36cfed4bc1c4951 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Fix parameter priorization documentationAntti Määttä2021-01-185-21/+30
| | | | | | | | | Fixes: QTBUG-64110 Change-Id: I09330ba29b0c120d6e7e0ae0b2bf8d4e388054e1 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 9c6563c780eef3890c83b82ebbb0ebf271fb6897) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qpicktriangleevent_p.h Add missing private API warningPaul Lemire2021-01-041-0/+11
| | | | | | | Change-Id: I57f758f279d62ee4508914d12f99ee68cd41a2c7 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 45dfb8a03f4ee2abb963ce3726eaef0dd1c2c521) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix sampler2DArrayShadow uniform in QShaderGeneratorJim Albamont2020-12-282-2/+2
| | | | | | | | Also update the test Change-Id: I23d897f40747192687e632d21aa8fe2f57645909 Pick-to: 6.0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Print warning about using primitive restart on ES2Mike Krus2020-12-221-0/+5
| | | | | | | Change-Id: I6007f1e152e38948b619cdeada84a86f7f4db4e4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 492c976b05256b29aac0df861c4be77e1eb65906) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Allow assimp to compile on non-gcc compilersJoni Poikelin2020-12-111-1/+1
| | | | | | | | | | | | Gcc 4 version check can also be dropped since it is not supported anymore. Fixes: QTBUG-88821 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit c6716fa7f044985389038802a296bae83951b119) Change-Id: Ice522afc92823156e9545e8e75b16c2c0a614d6f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix binding of CubeMapArray texturesJim Albamont2020-12-114-6/+113
| | | | | | | | | | | | | | | To bind to a specific face: use glFramebufferTextureLayer and calculate the layer as 6 * layer + face. To bind to a specific cubemap: There is no way in OpenGL to directly bind to an entire cubemap within the array. Instead bind to the entire texture as for a CubeMap with AllFaces. It is up to the drawing code to select the right cubemap and face, 6 * layer + face Change-Id: Ib9e1a598503eeba1fa729677944aba6d799f90b2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 94ab90f93dc5338338f30e6d78854b55353d3cb8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix disabling shader cache via environment variableJim Albamont2020-12-092-1/+3
| | | | | | | | | | | The tests were a broken too because the QT3D_DISABLE_SHADER_CACHE environment var was still set from the previous test. These tests passed before because the shader builder used the cache if either the QT3D_DISABLE_SHADER_CACHE or QT3D_REBUILD_SHADER_CACHE are not set. Change-Id: Ic04bf3bb8bb7b9b27e3dc9663fe5e96647a3bed4 Pick-to: dev 6.0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QShaderProgramBuilder: add documentation related to cachingPaul Lemire2020-12-071-0/+32
| | | | | | | Change-Id: Icdab60d721a0a5186fe3e8844f40e2e448eb94d5 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit cf8688e0ab17f83ad2909431bfae7be209ba7155) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* OpenGL renderer: fix use of outdated VAO when shader is reloadedPaul Lemire2020-12-013-7/+27
| | | | | | | | | | | | | | | | In a case where an existing shader was updated, VAO previously associated with the shader wouldn't be updated properly. To account for this, we now release all VAOs associated with a shader when loading a shader. Additionally we also skip VAO creation of commands referencing a shader that was loaded in the current frame. The reason for that is we know the command for that VAO is not completed. Qt3D requires a first frame to load a shader + perform introspection and creates valid command against shader only on the following frame. Change-Id: I36f89fdd78e857dc5bc4af3b539d3b32630dfad6 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 7f1bcdb799ad689fc138f976eed7e12f1ce64386)