summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/geometryrenderer
Commit message (Collapse)AuthorAgeFilesLines
* Hide deprecated functor APIMike Krus2020-02-121-58/+0
| | | | | | | | | | Now private for QTextureGenerator and QGeometryFactory updates. QTextureImageDataGenerator remains for now as it was not previously deprecated and, mainly, it's the only API to get data into an image. Consequently, QAbstractFunctor has been un-deprecated. Change-Id: Ie6691bc402ad603d63abcf1ec9fc3513091f5740 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>
* Clean up includesMike Krus2019-10-011-3/+0
| | | | | | | | | Remove include statements for classes that are no longer used. Makes it easier to find remaining use cases that need addressed before complete removal in Qt 6. Change-Id: I60529ba1929ad64b162d3847d5df47cde2a60dad Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update QGeometryRenderer to use direct sync modeMike Krus2019-09-181-106/+82
| | | | | Change-Id: Ie7bf8f248d38a98860fb84d7053d75f3383a5bbd Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Revert "Keep rendering in sync with aspect jobs by adding barriers"Paul Lemire2018-02-281-3/+0
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 46319648436814afb5a77755dde6681e304befaf. We want to be able to render one set of RenderViews for frame n while concurrently building RenderViews for frame n + 1. The reverted commit removed that behavior which reduced the CPU time available to prepare a frame. This would cause on some scenes a failure to meet the ~10ms budget we have to prepare a frame. This is therefore a regression. The root cause behind this regression is that a job cannot be executed until all the jobs which have been previously launched have completed. The proposed solution would be to instead add an OpenGL command thread that can be used to load graphics resources required for the RenderViews directly when required. This would in turn allow to cache RenderViews and keep the concurrent behavior of RenderView submission and creation. With that goal in mind, the following patches will be rebased and updated https://codereview.qt-project.org/#/c/189309/ https://codereview.qt-project.org/#/c/189310/ Change-Id: I4879047c45986a0e615e3aef7b7352f82a04a9da Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge remote-tracking branch 'origin/5.10' into 5.11Sean Harmer2018-02-151-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/animation/doc/src/qt3danimation-module.qdoc src/render/backend/abstractrenderer_p.h src/render/backend/buffervisitor_p.h src/render/backend/renderer.cpp src/render/backend/renderer_p.h src/render/backend/triangleboundingvolume_p.h src/render/backend/trianglesextractor_p.h src/render/frontend/sphere_p.h src/render/jobs/calcboundingvolumejob.cpp src/render/jobs/job_common_p.h src/render/jobs/pickboundingvolumejob.cpp src/render/jobs/pickboundingvolumejob_p.h src/render/jobs/pickboundingvolumeutils.cpp src/render/jobs/renderviewjobutils_p.h tests/auto/render/boundingsphere/tst_boundingsphere.cpp tests/auto/render/commons/testrenderer.h tests/auto/render/raycasting/tst_raycasting.cpp tests/auto/render/render.pro tests/auto/render/renderer/tst_renderer.cpp Change-Id: I76633bc5a5a065e5f9ea62cc16563377e5c693a3
| * Keep rendering in sync with aspect jobs by adding barriersSvenn-Arne Dragly2018-02-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that jobs that depend on a specific state of the renderer (such as context being initialized) never run before this is the case. This reduces the number of possible race conditions and checks we need to do to ensure the jobs and the renderer are in the correct state. This way we no longer swap buffers when nothing has been rendered, which in turn makes sure that we only draw one frame when the render policy is OnDemand and there are no changes. This change also adds a number of assertions on pointers to resources to make it easier to detect missing job dependencies. Finally, this change overhauls the job dependencies in Renderer and RenderViewBuilder. Task-number: QTBUG-66024 Change-Id: I3e4e9dd0dd53b5c88f5c1b17d68df42f28eae794 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Replace Q_DECL_FINAL with finalKevin Funk2017-09-251-2/+2
|/ | | | | Change-Id: Ia80d1cb9cc96d76f8b367caa725c59a70ae0a4d5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge branch '5.9' into devSean Harmer2017-08-191-8/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/backend/renderer.cpp src/render/backend/renderview.cpp src/render/graphicshelpers/graphicscontext_p.h src/render/graphicshelpers/graphicshelperes2_p.h src/render/graphicshelpers/graphicshelpergl2_p.h src/render/graphicshelpers/graphicshelpergl3_2_p.h src/render/graphicshelpers/graphicshelpergl3_3_p.h src/render/graphicshelpers/graphicshelpergl4_p.h src/render/graphicshelpers/graphicshelperinterface_p.h src/render/jobs/pickboundingvolumejob.cpp tests/auto/animation/clipanimator/tst_clipanimator.cpp tests/auto/auto.pro tests/manual/manual.pro Also disabled the QQmlMetaType codepaths following commit 49a11e882059ee1729f776722e085dd21d378c36 in qtdeclarative. The QQmlMetaType codepaths will be re-enabled once a qt5.git integration has succeeded. Change-Id: Ia654d75425e6d406c472d19864383612208cad2b
| * Use QSharedPointer::create() moreMarc Mutz2017-07-221-8/+8
| | | | | | | | | | | | | | | | | | | | This is the result of running the (experimental) clang-tidy check qt-modernize-qsharedpointer-create Discarded changes: none. Change-Id: Ic6368521ebf5841267ffe7917cc652627f7b26a7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Properly check that the functor has actually changedSean Harmer2017-07-281-0/+11
| | | | | | | | | | | | | | | | Otherwise we if we blindly set the same functor we are repeating the work it does for absolutely no reason. Change-Id: Icc05a82bcb893f83c9ddcf09c1c3d1e8a2c34708 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Fix: set renderer dirty flag on initializationPaul Lemire2017-07-281-1/+25
| | | | | | | | | | Change-Id: I9c164409e3ced5d78182542ae060692e0f65d3ac Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QGeometryRenderer: add index buffer byte-offset propertyMauro Persano2017-06-281-0/+21
| | | | | | | | | | | | | | | | | | | | Add property to QGeometryRender to set a byte-offset into the index buffer. The property will only be valid when the geometry has an index buffer attribute. Task-number: QTBUG-60027 Change-Id: I87409b89766e622fd9a4ab8233f0bc0578f15852 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Renderer: add more dirty flags and launch jobs based on thatPaul Lemire2017-06-011-1/+29
|/ | | | | | | | | This allows to launch the boundings volumes and transform related jobs only when transforms or geometry have changed. This will be extended in the following commits to Materials, FrameGraph... Change-Id: I71bc61471639ead32de71c9e78952fb0741ef185 Reviewed-by: Mike Krus <mike.krus@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>
* QGeometryRenderer: fix notification of geometry changingPaul Lemire2016-07-041-2/+4
| | | | | Change-Id: Ic0fc25a9aacf47863d0ac058d3be687415b2cbdd Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename QNodeRemovedPropertyChange -> QPropertyNodeRemovedChangeSean Harmer2016-05-101-2/+2
| | | | | | Task-number: QTBUG-51494 Change-Id: I1c7f1c680bc18c6201b790e96dc4023564837122 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename QNodeAddedPropertyChange -> QPropertyNodeAddedChangeSean Harmer2016-05-101-2/+2
| | | | | | Task-number: QTBUG-51494 Change-Id: I7f59bad66eb086e2249c580be2fd9f4bad159eb3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QNodePropertyChange -> QPropertyUpdatedChangeSean Harmer2016-05-101-10/+10
| | | | | | Task-number: QTBUG-51494 Change-Id: Ic326499f80b5a91b2d19c09770de926f220cc805 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove QSceneChange::SenderTypeSean Harmer2016-05-101-9/+9
| | | | | | Task-number: QTBUG-51494 Change-Id: I2414bee3b9eb3bd1146fd356bb0552366e63a976 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove ChangeFlag from NodeUpdated change type ctorsSean Harmer2016-05-101-10/+9
| | | | | | | | | | | | ...and fix resulting compilation issues and tests. Had to temporarily allow QNode[Added|Removed] property change to be able to handle QVariant payloads too. This will be split out into a separate pair of classes in a future commit. Task-number: QTBUG-51494 Change-Id: I1748e3b8aa3c39fa171ee0c5af4204502826ba07 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename NodeAdded/NodeRemoved ChangeFlagsSean Harmer2016-05-101-1/+1
| | | | | | | | | | | | | | | | These are not just for adding/removing QNodes. They are more general in purpose and are used for adding/removing values to/from collection based properties e.g. QVector<MyValue>. The addition/removal of QNode pointers (which we translate to QNodeIds) is just the most common case. If Q_PROPERTY/QObject gains support for properties of collections and the typical operations on them, then we will be able to catch and handle most uses of these change types in QNodePrivate just like we do for setting a Q_PROPERTY. Task-number: QTBUG-51494 Change-Id: I707de1647554a61accf81dc79bfe58b289dbff7b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename NodeUpdated ChangeFlag to PropertyUpdatedSean Harmer2016-05-101-9/+9
| | | | | | | | This more correctly reflects the semantic meaning. Task-number: QTBUG-51494 Change-Id: I3a230e959ea007f1d19808eae73b5d95b6f06514 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove QBackendNode::updateFromPeer()Sean Harmer2016-05-031-2/+3
| | | | | | | | | | Implemented a few missing initializeFromPeer() implementations along with the corresponding frontend node creation change creation functions. Adapted unit tests. Change-Id: I571e53a7b68a5544bd0e308df0baf7e52533306e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove QbackendNode::setPeer(QNode *)Sean Harmer2016-05-022-3/+7
| | | | | | | | ...and fix up unit tests by using the QbackendNodeTester to simulate the initialization performed by QAbstractAspectPrivate. Change-Id: I61207f9f1631494f926552bef8eba33cc2a45850 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Q_NULLPTR -> nullptrSean Harmer2016-05-011-2/+2
| | | | | | Task-number: QTBUG-52736 Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QNodeRemovedChange: contains QNodeIdTypePairPaul Lemire2016-05-011-1/+1
| | | | | Change-Id: I081f814c4d0a942e50c37cf30a5f731f67df5cb3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNodeAddedChange: contains a QNodeIdTypePairPaul Lemire2016-05-011-4/+15
| | | | | | | That allows to know what type of node was added Change-Id: I89829794655fac81bdc9840ae83473640b0a384a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GeometryRenderer use new added/removed change typesSean Harmer2016-04-271-7/+8
| | | | | | | | | I think it may be possible to avoid this for single value QNode* properties and just rely upon the automatic notifications done by QNodePrivate. Needs investigating and testing. Change-Id: Id978e8501dc229ba4eb73a5be3b3480b967562b0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename QScenePropertyChange -> QNodePropertyChangeSean Harmer2016-04-211-12/+12
| | | | | | | Trying to unify naming of change types. Change-Id: I0bfca0b7ba5adeaaa6145f75ddb41731f76adc09 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* GeometryRenderer: use m_enabled member from base classPaul Lemire2016-04-151-5/+5
| | | | | | | Unit test updated accordingly Change-Id: I3a0e01250f0b4d56f13f0a5038b5699ee369cce0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QGeometryRenderer API changesMike Krus2016-03-131-36/+36
| | | | | | | | | | | | - primitiveCount -> vertexCount - baseInstance -> firstInstance - restartIndex -> restartIndexValue - primitiveRestart -> primitiveRestartEnabled - baseVertex -> indexOffset Task-number: QTBUG-51515 Change-Id: I95e1e04e08b6441fcf8721db382f8f0c457f6faa Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Class QGeometryFunctor renamed to QGeometryFactoryFranck Arrecot2016-03-091-20/+20
| | | | | | Task-number: QTBUG-51475 Change-Id: I4d679b1001df2e8a4d57f0aa5511b3c49812cfa0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QBackendNode::peerUuid() renamed to peerId()Paul Lemire2016-03-051-3/+3
| | | | | Change-Id: I72471d0b22d16bbbee33610e30a06daadffedbd9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Propagate backend node changes to Renderer; render-on-demandWieland Hagen2016-02-242-0/+7
| | | | | | | | | | | | Each sceneChangeEvent marks a dirty bit in the AbstractRenderer. If no changes were accumulated during one frame, the renderer decides not to render the frame, by returning false from shouldRender(). We still need to go through each backend node and see what flags to set exactly, and to make sure we also react on backend-initiated changes. Change-Id: I80588bc5c4ebeb5d57b45ddfbd4d79ec268968b1 Reviewed-by: Sean Harmer <sean.harmer@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-4/+4
| | | | | | | | 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>
* RenderGeometryRenderer: monitor the enabled propertyPaul Lemire2015-10-141-0/+15
| | | | | | | | Unit tests updated accordingly Change-Id: I74c9e2926ac4c648ea35347762aa3fd0c5842146 Task-number: QTBUG-48630 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Move Qt3DCore into Qt3DCore namespaceSean Harmer2015-10-131-12/+12
| | | | | | | Update other aspects, tests and examples accordingly. Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename RenderGeometryRenderer to GeometryRendererSean Harmer2015-10-132-0/+314
Change-Id: I6e6352de622a7b18eaa5f1f89d15a1d90dd68329 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>