summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Conan: Fix iOS buildsIikka Eklund2020-12-021-0/+13
| | | | | | | | | | | | | | | | | | | | Conan passes some autodetected iOS related CMake options like CMAKE_SYSTEM_NAME, CMAKE_OSX_ARCHITECTURES, CMAKE_OSX_SYSROOT, which apparently don't work out of the box. - Explicitly pass 'iOS' for CMAKE_SYSTEM_NAME - Remove the explicit sysroot 'CMAKE_OSX_SYSROOT', let CMake detect the sysroots, to ensure that multi-arch builds work. - Remove the conan provided architecture 'CMAKE_OSX_ARCHITECTURES', instead rely on the architectures set by the Qt toolchain file, which with official Qt packages most likely means multi-arch iOS. Task-number: QTBUG-89020 Change-Id: I3c559f00f9391edf68bf88348baae561dc5f0991 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 2ed189225580f49695560b59f4fe341da4444253) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Force command filtering based on frustum culling resultPaul Lemire2020-12-011-2/+5
| | | | | | | Change-Id: I9def719816548d45e1235cb4f65bf0c0d6d0f405 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit f56bc203388866614d8c9f3653c5c835a58ff8d7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix deadlock when running with QT3D_MAX_THREAD_COUNT=1Paul Lemire2020-12-0113-70/+34
| | | | | | | | | | Also remove duplication and make QAspectJobManager::idealThreadCount the centralized function to retrieve expect maximum number of threads. Change-Id: Iec8d65d368ac7825ef87e883a987551726603adc Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 9ef97eaee6a1e795f0e5c2af7df29148914fb1b3) 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) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* RHI: restore QBufferCapture featurePaul Lemire2020-12-018-18/+109
| | | | | | | | | | Also fix manual test to import Qt3D.Core 2.9 since QBuffer was moved to core in Qt 6 and accessType property was introduce with revision 9. Change-Id: I449f413fd161fe4660cef61708cd641e429c1c81 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 10adc1c93c80dba4535a3cf22c5095d788ae0a43) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add RHI technique for distance field rendererMike Krus2020-11-302-0/+21
| | | | | | | Change-Id: Ia69dceb8ade566c2b67ce681b7b554e0babb17f2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 4e248d8d0229f8afa283e9e9fe57f54a92bf4477) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* RHI: handle uniforms of type arrays properlyPaul Lemire2020-11-283-1/+37
| | | | | | | | | | | | | | | | | | | | We weren't handling the possible array stride for uniform arrays. For a float[8], the GPU might expect each float to fit in a vec4 slot. We therefore have to handle that when uploading the values otherwise we could end having data in what the GPU believe is padding data. This required modifying the UniformValue object to report the number of elements it contains as it might not necessarely be the same as the array dimension reported by the shader introspection. Note: it seems that the arrayStride might not be reported properly. To work around that, if we know we are dealing with an array, we compute the stride ourselves. Change-Id: I12b5379927dd47be888a40db58c2e5aba6e0730b Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit cf6b181227b02b23050198d21c54bd03eacd3b55) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Allow assimp to compile on non-gcc compilersJoni Poikelin2020-11-271-1/+1
| | | | | | | | | | | Gcc 4 version check can also be dropped since it is not supported anymore. Fixes: QTBUG-88821 Change-Id: Ice522afc92823156e9545e8e75b16c2c0a614d6f Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit c6716fa7f044985389038802a296bae83951b119) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Only set the state flag after having merged with the other statesPaul Lemire2020-11-271-1/+1
| | | | | | | Change-Id: Ic7a0a2cccb2b131eec7fca3cf7324109b4d22b6b Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 6df7098d89cf4a2eec35fe1362d354c91eb7a4ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* planet-qml example: port to RHIPaul Lemire2020-11-2620-6/+1385
| | | | | | | Change-Id: I4246c59903a6d8f302a916ba7d19e9e37b5fe9c8 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 230a2650d713b50fbec984deddfc3741bdf51d7a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Scene3D: handle flipping based on the RHI backend in usePaul Lemire2020-11-265-3/+28
| | | | | | | | | | | | | | | | Qt3D handles flipping based on whether the RHI backend in use requires it or not. Scene3D would also flip the content (ignoring the fact that the content was already in the correct orientation). This resulted in cases where a Qt 3D scene rendered with Scene3D would be flipped while the same scene rendered on its own (with Qt3DWindow) would be correct. Change-Id: I9fc2a01f63713ed3dbafaf896dfd9457d7160653 Task-number: QTBUG-87842 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit af56e7966d523714a3d64c0780fc266175431fd1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use RHI's clipSpaceCorrMatrix for backend where Y is not upPaul Lemire2020-11-2613-13/+37
| | | | | | | | | | | | | | | It's better to rely on RHI instead of a hard coded matrix. Also modify the UBO to provide the clipSpaceCorrectionMatrix and the uncorrected projectionMatrix. All the other matrices we compute and provide use the corrected projectionMatrix but these two new matrices give users the libertity of bypassing the correction if they need to. Change-Id: I52e409cc9b38ea0e939d19d92e2ddd907aa7d1cb Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 9c682cf8ffe302719df1202d89e560e4fe67739d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* control examples: fix asset path to also work on Qt6Paul Lemire2020-11-261-1/+1
| | | | | | | Change-Id: I723807d46d043c4d78dd6c6ead598886a7974efb Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 1e62ec8397ddd7d435b358c91ac1ed74e64b6f4c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* advancedcustommaterial example: add RHI supportPaul Lemire2020-11-265-0/+185
| | | | | | | Change-Id: I2e356cb893710c759a4d73eaf850ce39d46e5935 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 6531a4e6c5d28c4eb18fffb7611fdc97d42f97b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Clean up qml type handlingMike Krus2020-11-264-1251/+498
| | | | | | | | | Was duplicated code Change-Id: If20893a53bd75784fb8a268573f39b25c53d3f7d Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 4ba87fb9477e7143f3620f84ec51bd1ad9985588) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QShaderProgram: handle binding = auto replacement for raw shader codePaul Lemire2020-11-264-48/+80
| | | | | | | | | | | | | | | | binding = auto replacement only took place when using shader graphs. This meant providing shader code that used binding = auto or that included snippets that themselves used binding = auto (such as phong.inc.frag) would fail. For that reason, that replacement was moved from the shadergraph builder to QShaderProgramPrivate so that it can be used for both cases: raw shader code or shader graphs. Change-Id: I298a82b83b1181d7a0f19a2e2fefc3aeb9eb81c4 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 1e2902ba3e1285fb2db5a90712135b130fdbbb84) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* simplecustommaterial example: add RHI supportPaul Lemire2020-11-265-0/+61
| | | | | | | Change-Id: Id1dfc3c6a6f0c8090b5c5facc1a0dd9bb5a02bd6 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 4ad2efac3e734f72c0c8d0ff9739106728fe6c98) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Build docs for Qt 3DTopi Reinio2020-11-2644-102/+82
| | | | | | | | | | | In order to pass correct Qt include paths to QDoc's Clang-based C++ parser, move the documentation project to be under src/core. Fixes: QTBUG-88838 Change-Id: Ie1608eb295d94f20ef0089f73f3df1aceb566c14 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 44cae613ffa934cc358b97994a65c54a9bc2d8a6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix documentation warningsTopi Reinio2020-11-2520-191/+82
| | | | | | | | Fixes: QTBUG-88842 Change-Id: Ie8ea1914c5e740c0c4bf25f4754a008aff6401cd Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 2687a8b3c0428f0da71bef05324dfbdd3581fc20) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QAbstractTexture: expose mipLevelPaul Lemire2020-11-245-1/+78
| | | | | | | | | This is supposed to be exposed for Qt6 Change-Id: I3fefcd706ca16328946f33d665055dfe2a4c3563 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 5457ad2a0a58157c2ba7aa77c73d4b22883e4d0b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* RHI: handle compute commandsPaul Lemire2020-11-243-153/+61
| | | | | | | | | | | | | Remove comments which don't apply and empty performDraw command which was not used. Note: we have no easy way of knowing when a SSBO is also bound as a VertexBuffer. This forces us to set both flags. Change-Id: I39988978a5cad0e0507bbc91e978b44cb2037003 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 41ddcab8d568f61179dbd5dcd95f09807c02aa57) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* compute-particles examples: add RHI techniques and shadersPaul Lemire2020-11-249-19/+171
| | | | | | | Change-Id: I56f1bb06479f82a10dda6dce0902a64381cd8147 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit e57682ca4f8722ceb5835a522484635af6f8ea02) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Handle fallout from QEvent loosing it's copy constructorMike Krus2020-11-2414-654/+712
| | | | | | | | Task-number: QTBUG-88757 Change-Id: I5097faecd2e895d4685a4cc57a4e2a5c079f2255 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit d826238b65b0ebd8034900224b382bd85e6add27) Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Rename more test targets conflicting with qtbase onesKai Koehne2020-11-2420-18/+201
| | | | | | | | | Fixes: QTBUG-88790 Change-Id: I886592001ed2d8aad8ab6df542ea788b44d2ff71 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit e4cd93bcad4953e95f5bc6f3d35502a604f2ec97) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add Qt 6.0.0 changes fileJani Heikkinen2020-11-241-0/+17
| | | | | | | | | | | | Qt 6.0.0 is new major version for Qt and so on we don't need to list changes to the previous Qt release but guide readers to check porting guide. Task-number: QTBUG-88099 Change-Id: Iec1921e1857ea96765e04eaa8ae89c58257042a5 Reviewed-by: Antti Kokko <antti.kokko@qt.io> (cherry picked from commit c0a33004915cbeff385b12db3ca88262dd801885) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* RHI: add attr name/type when issuing warning about unsupported typePaul Lemire2020-11-231-1/+1
| | | | | | | Change-Id: I2f9eceb51d19dcd048036ee383fa3bab4e0678ff Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 34e3fa58dcd1b746e0f890b6a78823f8cfee9b12) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Follow up on change of QQmlListProperty to qsizetypeMike Krus2020-11-2367-178/+184
| | | | | | | | | | Also update dependencies and fix non-gui builds. Disabled (for now) gltf unit test since JSON parser seems to crash. Change-Id: I1aceb20d698e962e70103a92781fa7b646db86b3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 679f7c4988c75bc9d2cff450af0df842b955e22f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update qmake to match configuration flag changesMike Krus2020-11-233-9/+9
| | | | | | | Change-Id: I679c7d96002b1f58c7ae54fd3bfe044e395a0ed4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit c093cad12472b6151e2a3e194202d01568a7588f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update documentationMike Krus2020-11-232-8/+54
| | | | | | | Change-Id: I20195e764ee33ec6c8af3ded2ff7ec84c6ac3eb1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit fb687161002474d20772a594f7e61cf927443919) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update attributionsMike Krus2020-11-231-1/+1
| | | | | | | Change-Id: I24a9296314b119f8a1ebec07571f41341ce48858 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit c840677af00722a3f680a20114d4c94865bb223a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix deprecated API usage and compile warningsMike Krus2020-11-2353-307/+286
| | | | | | | | | | | - QVariant::Type deprecated, use QMetaType related APIs - QNodeId not used as reference in for loops (nop but really noisy) - some unused code Change-Id: I08f72181ae6eeb369ca41015a21813cd7bf05231 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 490fa176b69a390ce13168ae6c87623449b36d88) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add conanfile.py to support building with ConanIikka Eklund2020-11-101-0/+122
| | | | | | | | | | | | | | | | | | | | | | Support building qt3d with conan against Qt6 base binary package. The build recipe expects to locate QT_PATH from env. The 'qt-cmake(.bat)' is used for the build. 'CMAKE_TOOLCHAIN_FILE' is used to pick the toolchain file for cross compilations. For Android builds 'ANDROID_SDK_ROOT' and 'ANDROID_NDK_ROOT' need to be passed from env. The qt3d build expects the following from env: - QT_FEATURE_qt3d_assimp - QT_FEATURE_qt3d_opengl_renderer - QT_FEATURE_qt3d_rhi_renderer Change-Id: I9d1bea5e40f0196f02d8cdd8ef0d0b03b8b5c45b Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Rename "Porting" pages to "Changes"Jerome Pasion2020-11-092-2/+2
| | | | | | | | | | | | | | The content in the porting guides are closer to a changelog than a porting guide. At this point, it is easier for maintainers and contributors to write in a changelog than a guide. This change should help with readability and is closer to the usage of "Changes" in documentation. Part of a rename in other submodules. Task-number: QTBUG-87156 Change-Id: I10b2aaebfb49d1e289d663ddff042425ce772991 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Normalise configuration nameMike Krus2020-11-093-19/+19
| | | | | | | All others use qt3d_ prefix Change-Id: Id0405591a0fcfe62c8a510c9c226e85190d9a4cf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update dependencies on 'dev'Jani Heikkinen2020-11-091-3/+3
| | | | | | | Update Qt 6.0 Beta4 content Change-Id: I7cf35c6d050223185ce66f218be2fb0293be1279 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Add mipmaps count to QAbstracTexturePrivateJuan José Casafranca2020-11-053-0/+3
| | | | | | Pick-to: 5.15 Change-Id: Iaec05eb3d7d8647af14d2e155673dd25c3dae994 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix taking pending texture data updatesJuan José Casafranca2020-11-051-1/+2
| | | | | Change-Id: Iea9fee79797bf005938d13436d83726c1c7c837a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update dependencies in 'dev'Jani Heikkinen2020-11-051-3/+3
| | | | | | | Update to Qt 6.0 Beta3 SHA1s Change-Id: I8dfc4ff463d670885bcd41d7c32bf6f1dba0466a Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Fix build for latest qtbase changesMike Krus2020-11-051-1/+2
| | | | | Change-Id: Ifc20f29a849be695558851d5ea01a68f94c35f26 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make ObjectPicker optional for Scene2DMichael Brasser2020-11-041-23/+25
| | | | | | | Don't require it if mouseEnabled is false. Change-Id: I901e53b9df2f51e507af3c4423ebd71b253d1a6b Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix GLTexture cleanupPaul Lemire2020-11-046-1/+164
| | | | | | | | | | The GLTexture class wasn't registered for cleanup on the manager. This could result in it being reuse while not being reinitialized resulting in incorrect rendering. Change-Id: I85e6a5c3b5ca9d3cfa5ac5bcb1db3695dabfa576 Pick-to: 5.15 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Check if texture upload is full sizedJuan Casafranca2020-11-031-6/+23
| | | | | | | | | This allows to upload full sized compressed textures which was not working before if using the TextureDataUpdate API Pick-to: 5.15 Change-Id: Ic87e99e60e56d5a10550ca8efdc4f75a7ae1f0b1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Handle invalid entity names in QSceneLoader::componentMichael Brasser2020-11-022-0/+9
| | | | | | | | Return nullptr rather than crashing. Pick-to: 5.15 Change-Id: Ie11fe798e0bcd3bfdfda053331eabf9ed16e3d94 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add dedicated Qt3D.Renderer.ShaderCache logging categoryPaul Lemire2020-11-023-6/+17
| | | | | | | | | Might come in handy to troubleshoot issues with the ShaderBuilder caching of generated shaders. Change-Id: I2ccb68608857fa86ff20cb95047d38497df4b3ad Pick-to: 5.15 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Replace old Q_DECL statements with modern C++Allan Sandfeld Jensen2020-11-0249-315/+315
| | | | | | | | Since we have long depended on C++11 now, all of these can go. Change-Id: I8808af2cd5ce192864c636b521dadd7de189563b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix resource path for 3dcore testPaul Lemire2020-10-291-1/+1
| | | | | | | Windows doesn't like colons in a path. Change-Id: Ia5e8da4e45bf8e99600eb8ab0bcd610fa5e2ad64 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Finish removing traces of Scene3DViewMike Krus2020-10-2813-502/+1
| | | | | Change-Id: I450e53cc716235db1bc0675c904466050e17296d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add changes file for Qt 5.15.2Antti Kokko2020-10-281-0/+65
| | | | | | | Change-Id: If1c271dd2d673c19017c08a101a00f568bcc3363 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 34171b1d99f55fde1627df3c57eed50480ab2ae7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qt3dJani Heikkinen2020-10-281-3/+3
| | | | | | Change-Id: I565cdd85e8de0a40cb0bac58ab4935d39e3d8e98 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Mike Krus <mike.krus@kdab.com>