summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/qbuffer
Commit message (Collapse)AuthorAgeFilesLines
* Remove QBuffer::syncData propertyMike Krus2020-02-121-9/+0
| | | | | | | | Wasn't doing anything since 5.14, now pointless since there's no longer a loading functor Change-Id: I90d8884cf87b492cf966f99ef8d339f25a1fc35e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove buffer functor APIMike Krus2020-02-111-38/+0
| | | | | Change-Id: I78cc60ff634f909111b891d5b9716e19cae35f3b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove deprecated classes and functionsPaul Lemire2020-02-111-71/+15
| | | | | | | Mostly old messaging API Change-Id: I17eb2206b2ede56d2f7d36375d5e711d6149019f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Deprecate functor APIsMike Krus2020-01-311-0/+4
| | | | | | | | | | | | Deprecate functor based APIs for buffer generators, geometry factories, texture data generators and mesh loaders While these are useful for some of Qt3D's internal mechanisms, they complicate some of the backend operations. Will delete some or make them private in Qt6. Change-Id: I64eaa338e0306647867d2084819ef8591e2c91c0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update QBuffer to use sync updatingMike Krus2019-09-181-12/+5
| | | | | Change-Id: I3a48156b6e9303842ff0670295d28e36d1ff8a9e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Do direct notification of backend nodeswip/refactorMike Krus2019-08-281-19/+13
| | | | | | | | | | | | | | | | | Since aspect manager is now on main thread, we can directly update backend nodes safely. Track nodes which have changed properties and notify the backend nodes as part of the frame loop. This avoid allocating and delivering many change messages. To follow: - implement on all nodes - look at backend to frontend syncing - figure out what to do with non property messages (components added/removed, commands, ...) Change-Id: Ia0c442b0528e728c4324d168200bae021bc29266 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix deprecation warnings about Qt3DRender::QBuffer::BufferTypeFriedemann Kleint2019-03-121-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the calls as 6158b4ae7cc88848b03d5d592a671de7113c4faf states that it no longer has any effect, fixing: gltfgeometryloader.cpp:333:18: warning: 'void Qt3DRender::QBuffer::setType(Qt3DRender::QBuffer::BufferType)' is deprecated [-Wdeprecated-declarations] gltfgeometryloader.cpp:371:54: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] basegeometryloader.cpp:155:39: warning: 'void Qt3DRender::QBuffer::setType(Qt3DRender::QBuffer::BufferType)' is deprecated [-Wdeprecated-declarations] basegeometryloader.cpp:202:46: warning: 'void Qt3DRender::QBuffer::setType(Qt3DRender::QBuffer::BufferType)' is deprecated [-Wdeprecated-declarations] instancebuffer.cpp:61:39: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is dep tst_qbuffer.cpp:79:96: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_qbuffer.cpp:85:100: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_qbuffer.cpp:128:109: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_qbuffer.cpp:132:57: warning: ‘void Qt3DRender::QBuffer::setType(Qt3DRender::QBuffer::BufferType)’ is deprecated [-Wdeprecated-declarations] tst_attribute.cpp:56:68: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_attribute.cpp:108:68: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_buffer.cpp:74:68: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_buffer.cpp:271:68: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_buffer.cpp:297:68: warning: ‘Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)’ is deprecated [-Wdeprecated-declarations] tst_gltfplugins.cpp:519:95: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] tst_gltfplugins.cpp:574:95: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] tst_gltfplugins.cpp:967:83: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] tst_gltfplugins.cpp:969:82: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] tst_trianglesextractor.cpp:56:118: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] tst_trianglesextractor.cpp:57:116: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] tst_trianglesextractor.cpp:199:118: warning: 'Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType, Qt3DCore::QNode*)' is deprecated [-Wdeprecated-declarations] Change-Id: I6835598a1771a0ec3a0b080911fa4cada210a01a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-051-1/+0
|\ | | | | | | | | | | | | Conflicts: src/animation/backend/channelmapper_p.h Change-Id: I4e0f59c6648925ba45d30ccc2405524a9e901a0e
| * Deprecate QBuffer::typeKevin Ottens2017-09-221-1/+0
| | | | | | | | | | | | | | | | It can also be removed from the backend class, now the renderer doesn't look at it anyway. Change-Id: I5643922dccc81c0ee33f80e4b0ea34b63e51d89c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Replace Q_DECL_FINAL with finalKevin Funk2017-09-251-2/+2
|/ | | | | Change-Id: Ia80d1cb9cc96d76f8b367caa725c59a70ae0a4d5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove pointless template member function from QAbstractFunctorSean Harmer2017-03-301-1/+1
| | | | | | | Use template free function instead. Change-Id: I1171279423f164b877aaef21926ceda512fcbd2e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Tests: move TestArbiter into core commonPaul Lemire2016-11-181-0/+1
| | | | | | | | As it doesn't make sense to have it in render when mutliple submodules need that for their tests Change-Id: I853ca15a87051e4f63bfd7a24dae5e82014589b8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update unit tests for BuffersPaul Lemire2016-08-131-0/+13
| | | | | | Change-Id: I9337ba162a149a13fd0fe54ae878ebd726d94763 Task-number: QTBUG-50720 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid crash in QML app shutdown and actually send events in C++ appSean Harmer2016-05-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic was such that in a C++ application the QNode::setParent() function would bail out early in a C++ application when called from the destructor of its parent object. This is because by the time the child is being deleted the parent is in QObjectPrivate::deleteChildren and therefore the QNode part of the object has already been destroyed. This led to the cast in the parentNode() == parent to fail, thereby exiting the functio early and never getting into QNodePrivate::_q_setParentHelper(). In the case of a QML application, the parent has a dynamic metaobject set by the QML engine. This resulted in the cast in QNode::setParent() succeeding and we called into _q_setParentHelper(). The logic in here resulted in a crash when called from a destructor because the child had already been removed from its parent's list of children. Thus when we called QObjectPrivate::setParentHelper(), this function ended up with an index of -1 for the child in its child list (i.e. not found) and it then tried to index into the children list with this index and we then crashed. The solution in this change is to not do the full logic in QNode::setParent() and _q_setParentHelper(). Rather, we simply remove the subtree at this node from the scene and we send node destruction changes to the backend. With this we avoid the crash of QML application shutdowns and we also make sure to correctly send the node destruction changes even in the case of a C++ Qt 3D application. The backend does not yet get an opportunity to process these final changes. This will be addressed in a follow up commit. As a result of these changes many unit tests began crashing. This is because the QNode dtor is now actually doing some work, rather than bailing out of that work early when the parent is no longer a QNode. This work involves mutating the QScene object which in the unit tests did not live longer than the QNode's to which it was associated with. The unit tests have been adjusted to ensure that the arbiter and scene objects remain alive longer than the QNodes they are being used to test. Task-number: QTBUG-42353 Change-Id: I197870f48fca30656bd85c4c51346d93403fba08 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* QNodePropertyChange -> QPropertyUpdatedChangeSean Harmer2016-05-101-5/+5
| | | | | | Task-number: QTBUG-51494 Change-Id: Ic326499f80b5a91b2d19c09770de926f220cc805 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix CLANG reported warningsMike Krus2016-05-021-1/+1
| | | | | | | Ignored 3rd party libraries Change-Id: I20e1feac64a8fbfafc736b24d6d8c591192e817b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Q_NULLPTR -> nullptrSean Harmer2016-05-011-1/+1
| | | | | | Task-number: QTBUG-52736 Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Strip out cloning subsystemSean Harmer2016-04-291-26/+23
| | | | | Change-Id: I4def54a11de0f9c676ef6b2d7bd8e723ded25ab9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QNode: make cleanup a private slotPaul Lemire2016-04-231-1/+1
| | | | | | | | | | QT3D_CLONEABLE now implements a default dtor that calls _q_ cleanup QT3D_CLONEABLE_CUSTOM_DTOR is used for classes that really need to implement their own dtor but they need to invoke _q_cleanup manually Change-Id: I2937a3b9edeb5a763749f0044360d78ab4461a5e Task-number: QTBUG-51464 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename QScenePropertyChange -> QNodePropertyChangeSean Harmer2016-04-211-5/+5
| | | | | | | Trying to unify naming of change types. Change-Id: I0bfca0b7ba5adeaaa6145f75ddb41731f76adc09 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QBufferFunctor renamed to QBufferDataGeneratorRobert Brock2016-03-081-13/+13
| | | | | | | | | | bufferFunctor -> dataGenerator As per API review Change-Id: Ie67fff2fd6b75574ca840bd43836028c0726ec5e Task-number: QTBUG-51469 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QBuffer rename sync to syncDataRobert Brock2016-02-261-4/+4
| | | | | | | As per API review Change-Id: Ibb4fe23483ddf6d8fdeb9f8eea4112eb652d54a9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Unify license header usageAntti Kokko2016-01-261-17/+9
| | | | | | | | Updated license headers to use new GPL-EXCEPT header instead of LGPL3 one (in those files which will be under GPL 3 with exceptions) Change-Id: I930c6234bfe720d38c596bbc3d1f39be75a7328b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Rename Renderer -> Render throughoutSean Harmer2015-10-192-3/+3
| | | | | | | | This is for consistency between the C++ namespaces and QML imports and with the other aspects. Change-Id: I73392f138b4e519b12888f52530123e3d0ba445e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QBuffer: add a sync propertyPaul Lemire2015-10-141-0/+14
| | | | | | | | When true, data loaded through a functor will also be updated to the frontend. Change-Id: I2980e00a927ed5f787e217a20e2c42d8c5ea0e81 Task-number: QTBUG-48454 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Unit Tests: use the commons TestArbiter/PostmanPaul Lemire2015-10-142-77/+3
| | | | | Change-Id: Ic61ab8b30414297a4f65ee0695e91bfa578af5a6 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Move Qt3DCore into Qt3DCore namespaceSean Harmer2015-10-131-24/+24
| | | | | | | Update other aspects, tests and examples accordingly. Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move Render aspect into the Qt3DRender namespaceSean Harmer2015-10-131-19/+19
| | | | | | | Updated examples and tests accordingly. Change-Id: I8848a88472de2302aa072fa11f21ea934672b7e6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update RenderBuffer/QBuffer unit testsPaul Lemire2015-08-071-2/+48
| | | | | Change-Id: Iadb91977da8927544bd3b90ee512128367d70b84 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QBuffer/RenderBuffer: add a functor propertyPaul Lemire2015-08-071-0/+1
| | | | | Change-Id: Ic896425284c69a4cd71365b592444ce7edbc2dc2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QBuffer unit testsPaul Lemire2015-08-072-0/+231
Change-Id: I6fe878ac5eea05e80f59acbaafb6f5c7400145a7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>