summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add branches to optionally use the no cloning approach in aspectsSean Harmer2016-04-121-11/+21
| | | | | | | For creating/destroying nodes dynamically. Change-Id: I6328bc2f71d30c43b54f10a8f5667c3ac70f0153 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Protect against bad case in FilterKeySean Harmer2016-04-121-7/+14
| | | | | Change-Id: I0dcbe1a8d805d027f1322fcab160b1df737d72d5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Protect against bad cast in AttributeSean Harmer2016-04-121-4/+3
| | | | | Change-Id: I886de4405c422ef464657636fb214ac500a8364b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Protect against bad cast in GeometryRendererSean Harmer2016-04-121-3/+11
| | | | | Change-Id: I27607880f6bf411e55cbf2416e6da36fa38e84ef Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Only case to QScenePropertyChange if that's actually what it isSean Harmer2016-04-121-4/+9
| | | | | | | | | | | | | Now that we also have QNodeCreatedChange/QNodeDestroyedChange we need to protect against casting to incorrect types. It may well make sense to have a helper on QBackendNode that calls a specific virtual for the different change types. This would be analogous to QObject::event() calling e.g. resizeEvent() with an argument properly cast to the right type. Change-Id: I5313ba43c39b6e47f3fdf1f8f26f3e6d57a5677c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update QScene in the no cloning code pathsSean Harmer2016-04-121-0/+16
| | | | | | | | Added some todo's to investigate folding the scene updates into the tree traversal used to build the creation/destruction events. Change-Id: Ia05bca989bc5f44d29e85d9a09c3d25cf32f0776 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add code path for destroying backend nodes when removed from the sceneSean Harmer2016-04-123-33/+43
| | | | | | | ...and not using cloning. Change-Id: I768f2bfc93b8a2654535056bc918aae1c3a89fa1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add codepath for dynamic object creation that avoids cloningSean Harmer2016-04-121-30/+42
| | | | | | | | Need to do similar for destruction. Scope to optimize delivery of creation events noted in a TODO. Change-Id: I1076824f7e8a6048cdf3060d6a9df5f06361b8ef Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QNodeCreatedChangeGenerator helperSean Harmer2016-04-126-19/+149
| | | | | | | | | This can then be used by the QAspectEngine to create creation changes at startup and by QNodePrivate to generate creation changes for dynamic objects at runtime. Change-Id: Idf13fc249de7238a8c5803634a825bd86bc3c52a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add temporary flag to allow QNode to avoid cloningSean Harmer2016-04-122-0/+4
| | | | | Change-Id: I13435b356a2466daa37e5913b4889f7be233591e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add no cloning version of QAbstractAspectPrivate::clearBackendNode()Sean Harmer2016-04-122-0/+35
| | | | | Change-Id: If2d290c15f8d7ffaed40083ecc6a5daf5686d274 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Query cloning vs no cloning once (per aspect)Sean Harmer2016-04-122-2/+5
| | | | | | | | This will allow to try out the no cloning approach on hotter code paths without readign the environment variable every time. Change-Id: I5cd4532ef942496640b09984784eb80e2203ebce Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QNodeDestroyedChange and send from QNode dtorSean Harmer2016-04-129-4/+290
| | | | | | | | Taking care not to do this recursively. One event can take care of notifying the backend of an entire sub-tree being destroyed. Change-Id: Iabf849317943b982eebac72e201e117c2f174026 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QAbstractPhysicalDevice creates creation changesSean Harmer2016-04-122-0/+8
| | | | | Change-Id: I3b753b529f7cae5b839620598a8414fb78589451 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix surface size settingMiikka Heikkinen2016-04-112-1/+2
| | | | | | | | | | Now non-window sized viewports work, too. Task-number: QTBUG-52498 Change-Id: Icc4aba3f93d78b4266a3b565156fe8799797baef Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Antti Määttä <antti.maatta@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Properly handle alpha to coverage state in non-cloning codepathSean Harmer2016-04-1116-61/+39
| | | | | | | | | | | | Also improve the alpha to coverage handlign in the helpers by using a single function rather than two. This removes GL errors about bad glFace enum values (caused by bad handlign of alpha to coverage in switch statement, which led to a FrontFace state being created with bad data). Change-Id: I832d92fcb07134525f421d3a3b4d12e9f5f6428c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Ensure that QNodeCreatedChange objects have subjectId set correctlySean Harmer2016-04-115-14/+16
| | | | | | | | | | | | This ensures that subclasses of QNodeCreatedChangeBase always pass in the QNode pointer that allows to correctly set the subjectId to be the id() of the QNode. With this change the materials-cpp example is now able to run using the new node creation mechanism. Change-Id: I0a5ce4f3e93b485adfdb7534c15493946cfa00c6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderStateNode handles creationSean Harmer2016-04-115-12/+157
| | | | | | | Also remove last vestiges of blend state separate. Change-Id: I75d3a97ae8383b5ad1bcdb903ed745cbcda31eec Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move RenderStateNode into its own filesSean Harmer2016-04-117-67/+180
| | | | | | | | The genericstate_p.h has gotten a little large and contains several classes. Change-Id: I76126a300afaa4dda4686fb231dd9d8c9cc68fab Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QStencilTest creates creation changesSean Harmer2016-04-106-41/+196
| | | | | Change-Id: I19965c493c0eac74c9f86a74075c113ba499d34e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QStencilOperation creates creation changesSean Harmer2016-04-106-36/+195
| | | | | Change-Id: I4de6a94381e67be0b98e4786d057196e3729b501 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QStencilMask creates creation changesSean Harmer2016-04-104-15/+96
| | | | | Change-Id: I601adac5931ec845f4ac134d24d6b8bc02dc3989 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QScissorTest creates creation changesSean Harmer2016-04-104-24/+106
| | | | | Change-Id: I5e476276cb7b7f1e12859df708be5fe3077419bc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QPolygonOffset creates creation changesSean Harmer2016-04-104-18/+99
| | | | | Change-Id: Iaa7166d38424b3a987d56c3bf1a1559e9588031a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QPointSize creates creation changesSean Harmer2016-04-104-17/+99
| | | | | Change-Id: If0ffa048913fd8d90e1b53235a1d2a2c6fe2b555 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QFrontFace creates creation changesSean Harmer2016-04-104-17/+94
| | | | | Change-Id: If7cf27c255d7b307ada564618baa44f07596ecc1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QDepthTest creates creation changesSean Harmer2016-04-104-19/+94
| | | | | Change-Id: I569ced3777ee0963e5471d1a8f623d8cfaaa900e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QCullFace creates creation changesSean Harmer2016-04-104-17/+94
| | | | | Change-Id: Ib06ce379ad2aaa6abca4f5d0f6c3301ad0c59577 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QColorMask creates creation changesSean Harmer2016-04-104-21/+105
| | | | | Change-Id: I1f7673e8494c2dd43a874c101f0d806dfdb3d02c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QClipPlane creates creation changesSean Harmer2016-04-104-17/+100
| | | | | Change-Id: Ie7c2490664a7efc7704b547f9fa7bf92d29653d5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QBlendEquationArguments creates creation changesSean Harmer2016-04-104-26/+111
| | | | | | | | | | | | | We should change the QBlendEquationSeparate class so that it does not inherit from this one. That would then allow us to simplify this class to not contain the alpha arguments. Alternatively, we could investigate folding the separate args version into this by introducing a NotSet value that we default the alpha arguments to. If they are NotSet then we use the non-separate blending functions on the backend. If they are set then we use the separate Rgb + Alpha blending functionality. Change-Id: I14993b338228d120c6309536b0a286bed9ed870c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QBlendEquation creates creation changesSean Harmer2016-04-104-17/+93
| | | | | Change-Id: I5abb94ebf2dd66114d4fa6cc5cd783f6725e8a15 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QAlphaState creates creation changesSean Harmer2016-04-104-19/+98
| | | | | Change-Id: I3c12a75146fc8753f6c8dbfc2026dffa896fb67f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QRenderStateCreatedChangeBase and typed subclassSean Harmer2016-04-105-1/+185
| | | | | | | | Will be used to pass renderstate type to the backend so that it can be cast to the correct payload type. Change-Id: I94ccc8bb90425b2f9dd1cb50ceb3de2813d68b0b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix auto-complete error in ViewportNodeSean Harmer2016-04-101-1/+1
| | | | | | | | | | With this commit, the renderer is able to draw the cylinder-cpp example with the QT3D_NO_CLONE environment variable set! Input is not yet working again. Change-Id: I6df29546559591ed9f9c1d3e4c150227bdeb7798 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Render::Transform handles creationSean Harmer2016-04-102-0/+14
| | | | | Change-Id: Ib6a7ec403342fc67b9055383ba5d07d47a4d7ea7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Do enabled state and parent/child relationship init in framegraph baseSean Harmer2016-04-1012-2/+18
| | | | | | | | | | | | | Move this out of the creation functor as the peerId is not set at this point which breaks the setParentId() function. Move this to the initializeFromPeer() function and have each FrameGraphNode type call the base class implementation to set the basic stuff up. With this change, the main loop now runs through using the QT3D_NO_CLONE env var. However, it does not render again, yet. Change-Id: Ied12deb4732b5c103e647cc4cfea935114ea31ca Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Change signature of FrameGraphManager::appendNode() slightlySean Harmer2016-04-103-5/+5
| | | | | | | | | | To make the id explicit rather than the function extracting it from the QBackendNode. This is because under the no cloning approach the QBackendNode does not yet have its peerId() set at this stage. We do however have it from the change itself. Change-Id: I2dc1607088b8e8039094755529f6afb127b607f8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Reinstate dependency of RV jobs on bounding volume updatesSean Harmer2016-04-101-2/+1
| | | | | | | Also remove obsolete comment. Change-Id: Ic2b0f77ba318d2edc272fa12dc88ebab868224eb Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Create proper pimpl type from QPhysicalDeviceCreatedChangeBaseSean Harmer2016-04-103-1/+11
| | | | | Change-Id: I5d430a3ec2d5e18219d5e16fd9819b0ffac1e650 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderSettings handles creationSean Harmer2016-04-102-1/+14
| | | | | Change-Id: Ib356c3b960ad7ef9aa937ca85e5f46b69e5cff31 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QRenderSettings creates creation changesSean Harmer2016-04-103-1/+22
| | | | | Change-Id: I2565b933c7319130ba7eee6e9316df2d12f5936e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove last vestiges of CameraLens' clearColorSean Harmer2016-04-102-5/+0
| | | | | | | This is now on the clear buffers node. Change-Id: I0fec56d1596523ddb4121a9a39a5a3a47e071c31 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* CameraLens handles creationSean Harmer2016-04-102-3/+13
| | | | | Change-Id: I70403ff6a7f028800e81b8c7c4f9738c3328f7c5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QCameraLens creates creation changesSean Harmer2016-04-103-0/+14
| | | | | Change-Id: I96049adc485f503e66232f0dc8c13b121eb69813 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Texture handles creationSean Harmer2016-04-102-0/+36
| | | | | | | | Added a TODO about rethinking the approach for setting up the relationship between Textures and TextureImages. Change-Id: I97f6d4ee5194e2b255c06a0f236f7fdbe265cc5b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QAbstractTexture creates creation changesSean Harmer2016-04-103-0/+47
| | | | | Change-Id: Ia164f44c53047c258c9e256fee20df0c8ecb9496 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QAbstractTextureImage creates creation changesSean Harmer2016-04-105-0/+46
| | | | | | | Backend type handles them too. Change-Id: Ibd87c2e5a464c0953c1b017db21e7831ca4c6681 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Technique handles creationSean Harmer2016-04-102-0/+23
| | | | | Change-Id: If20053bba9c494673e6768ee9bf9b15fb9665bf9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Shader handles creationSean Harmer2016-04-102-2/+23
| | | | | Change-Id: I0705d14a4d7c5a9ce6df5274ff8e59414f55e695 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>