summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Shader: make uniform block accessors constPaul Lemire2020-01-272-33/+30
| | | | | | | To prevent any container detaching Change-Id: Ie7de744fd492efaab49aa133a7904b293dc7d178 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix picking with primitive restart for line loopsMike Krus2019-12-131-26/+31
| | | | | | | | | Previous fix was not closing the loop on every primitive, just the last one. Task-number: QTBUG-71919 Change-Id: I22d52258477b0c4777118ee36a0b3868da982885 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix picking with primitive restartMike Krus2019-12-134-2/+22
| | | | | | | Task-number: QTBUG-71919 Change-Id: If7923fab6c43f5d7139d1bbdceb73c17bf489099 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 69789d0184ffa54c1760ad5204bb4539c9399753)
* QNode: stop using hash<node,connection> for bookkeepingPaul Lemire2019-11-042-9/+17
| | | | | | | | | | | | | | | It is totally valid to have actually the same node used for 2 distinct connections (e.g setting 2 different node properties to the same node). With the hash, the second setter call would overwrite the first connection resulting in leaving a dangling connection around potentially resulting in crashes. Instead use a QVector<pair<node, connection>> and adjust code accordingly. Change-Id: I49870c409c3f7b629c8f1bdfcb8757a904db2490 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 906f8a62f89a7ce2343a155e6db62616e66dc14b) Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Ensure we can build assimp on Windows and macOS with non gcc compilersAndy Shaw2019-10-231-1/+1
| | | | | | | Fixes: QTBUG-75145 Change-Id: Ibee7d877bf78c2d2ed74ac8a89b7af5bf22f14f1 Reviewed-by: Antti Määttä <antti.maatta@qt.io> (cherry picked from commit b18845b0451cf0ff9c7611483b589ce51b3c9e1b)
* Renderer: check context thread before destroying resourcesPaul Lemire2019-10-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Only try to cleanup the resources if we know we are called from the right thread. releaseGraphicsResources can be called from 2 places: - Scene3DCleaner when using Scene3D (when closing the window) - AspectThread when the RenderAspect gets unregistered In configurations where the context lives in the main thread (Scene3D + single threaded render loop / ANGLE), the RenderAspect gets unregistered before the Scene3DCleaner has had time to call releaseGraphicsResources. This means that we won't release the resources ourselved and that the driver will have to do that for us. This has been fixed properly in 5.14 with the AspectThread removal. Task-number: QTBUG-60971 Change-Id: I49c1c2f74ad09e7162b988f87bac65863f8490d8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> (cherry picked from commit f60a57ebe0e9a4449fb0f8f28a38c0f69b3f845e) Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make sure right screen is set on QOpenGLContext and QOffscreenSurfaceAndy Shaw2019-10-149-0/+34
| | | | | | | | | | | When the Qt3D window is on a specific screen, then it needs to ensure that any supporting QOpenGLContexts and QOffscreenSurfaces are set to be using that same screen or it will fail to render the content. Change-Id: Ief4f3e88bf6f71862bc5dace0cb0bddcdf3a98b5 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 93aa379ae5cf624f024aa9173ce42e90b5c58002)
* Fix blitting to also blit depth and stencil buffersPaul Lemire2019-10-101-1/+2
| | | | | Change-Id: Ib7b491c638508cfcdfbd523fd4e6a3d757c2c832 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add a property map job in animation aspectJuan Jose Casafranca2019-09-2310-37/+253
| | | | | | | | | | | | | | | | | ClipAnimator is always dirty because at each frame the normalizedTime is changed. This has a big performance penalisation as we are launching job which updates the property map at each frame. This patch adds a new dirty flag which is use to decide if the animator need to update the mapping of the fcurve to actual node properties. Using that flag, a new UpdatePropertyMapJob is launched for dirty clipAnimators. Some scenes boost from 30fps to 60fps (vsync) during animation. Change-Id: Ic8a8db01535c55995bc569ea5a69660a40014401 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Minor fixes for QSprite* classesMichael Brasser2019-08-303-6/+6
| | | | | | | | * Fix off-by-one errors * Allow non-integer cell sizes Change-Id: I081cb5050a6805cbc9183fb2a7a1ee07b5594187 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Update MetalRoughMaterial documentionMichael Brasser2019-08-291-3/+3
| | | | | | | | These properties are not strongly typed. Change-Id: I02c8b793cc7b7f9e88a8b8598ea27efa93fa0468 Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix LerpClipBlend QML documentationMats Honkamaa2019-08-271-3/+3
| | | | | | Task-number: QTBUG-74682 Change-Id: I346d31333f4bbce9a909798c176ad09fc2267859 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QML documentation for ClipBlendValueMats Honkamaa2019-08-261-0/+11
| | | | | | Task-number: QTBUG-74683 Change-Id: I821e52ab071b422c1e1351d59b83e9879fa2a884 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Allow multiple instances of a few render statesHarald Vistnes2019-08-265-14/+29
| | | | | | | | | | Allow more than one instance of BlendEquationArgumentsMask and ClipPlaneMask render states. Task-number: QTBUG-77735 Change-Id: I9d2bdc82843e2eaf0f8a781208e4ca10e3a777c7 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add missing * for SkyboxEntity QML type documentationMats Honkamaa2019-08-261-1/+1
| | | | | | Task-number: QTBUG-77789 Change-Id: I3dcee435562c86ea9db98ee7c50a42d06bd576f9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Expand QCamera::exposure documentationMichael Brasser2019-08-201-0/+20
| | | | | Change-Id: Ia844b046720b530fbb9b7bac096d1853710225c3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Expand EnvironmentLight documentationMichael Brasser2019-08-201-3/+31
| | | | | Change-Id: Ia6e6ca65469c7c04914fbb6a73f796ec86436577 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Matrix_SSE/Matrix_AVX2: fix mapVectorPaul Lemire2019-08-202-16/+12
| | | | | | Change-Id: I4584d2c879a72eccbaf273d0e84b3b6f6bb55295 Task-number: QTBUG-77675 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Improve documentation of ObjectPickerJean-Michaël Celerier2019-08-071-0/+2
| | | | | | | Add a reference to Scene3D hoverEnabled Change-Id: I59e282a985ae5af30ff22d7caf433fb3b7cd821b Reviewed-by: Mike Krus <mike.krus@kdab.com>
* GLTexture: glTexParam is not supported on multisampled texturesPaul Lemire2019-08-071-0/+7
| | | | | | | So try to avoid performing these calls on such texture Change-Id: I051fd6a0150d07656687a1f84756d8a3d506ec24 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* submissioncontext fix: devicePixelRatio is not an integerPaul Lemire2019-08-071-1/+1
| | | | | | | | Converting it to int would cause the viewport not to take the whole expected size as the interger conversion would essentially floor the value. Change-Id: Ic608b0e1a0910aadb8b98c3225f999cba6326535 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Improve SortPolicy documentationMichael Brasser2019-08-051-3/+16
| | | | | Change-Id: If7759ce872d26087d181eefe24504409aa779ea9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* ShaderData: don't call markDirty(AllDirty)Paul Lemire2019-07-241-1/+1
| | | | | | | | But only markDirty(ParametersDirty) as that's the only thing this is affecting. Change-Id: I450d013dc266ca70ca51cfa866b731a6e8b6499a Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add QML documentation to QSkyboxEntityPaul Lemire2019-07-241-0/+45
| | | | | | Change-Id: Id82777c111827e8db8924d2d39b5844386344b69 Task-number: QTBUG-76767 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Provide more detail in *Light documentationMichael Brasser2019-07-234-0/+63
| | | | | Change-Id: I8d56836f1f075c7239b262454131062c10058026 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Silence warnings about null textures in uniformsMike Krus2019-07-221-0/+6
| | | | | | | It's common while textures are loading Change-Id: I360c88c72fbd0a034aff07451fd49be17b348d40 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Renderer: use last known good surface to reset render statesPaul Lemire2019-07-191-1/+1
| | | | | | | | | | | | | | | | | | | We were instead checking against the last surface used (which could be null) instead of the last known good surface to reset the render states. This could result in not resetting the render states and keeping dangling pointers around. To know if we can render, we check find the first non null surface in the list of RV. In most cases we can safelly assume that if first RV has a surface, all following ones will likely use the same surface. If we have no good surface we skip the rendering. However in the case you have a FG where the first RV has a surface but not the last one (which wouldn't really make sense but can happen if you mess up), we could end up in the above case where surface is nullptr though we have partially rendered something for the RV which had valid surfaces. Change-Id: I902b8c7a943ad2ca7e2f487873f73990cf8db433 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Align RenderView::buildComputeRenderCommands with buildDrawRenderCommandsPaul Lemire2019-07-191-3/+14
| | | | | | | State and parameter handling are the same between the two branches Change-Id: Ic8394a969184daead33253c9303c20ecf1a97484 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderStates: fix override of nested RenderStatesPaul Lemire2019-07-187-14/+33
| | | | | | | | | | | | | | When merging states, make sure we don't add several states of the same types with possibly different values. We should only add states with type we don't already have. Since the FG traversal is done from leaf to root, we know that the states we already contain should override any state that may have been specified higher up in the FG branch. Change-Id: I9bd1eadd37e8addf740a4b85b2318f9be269fedb Task-number: QTBUG-76766 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Document an example of how textureScale might be usedMichael Brasser2019-07-157-0/+51
| | | | | Change-Id: Iead857526a06b104080ab843b26c49efc22f05cc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QRay3D: normalize the direction vector internallyPaul Lemire2019-07-151-4/+4
| | | | | | | | | It can be created with a non normalized dir vector but we should always perform the computations with a normalized dir vector for correct results. Change-Id: Ie9108de7ed2092f6b979a70ad9391267fe6c4696 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Take shortest path on quaternion slerpJuan Jose Casafranca2019-07-153-12/+38
| | | | | Change-Id: I4499e945481a22adfbafcc82198f7c411d04301b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Joints: remove removed joints from dirty listPaul Lemire2019-07-153-0/+8
| | | | | | | | | In case a joint is added and destroyed within the same loop of the event loop, we need to remove it from the list of dirty joints to process as this otherwise results in an assert. Change-Id: If2f4ece6e2d69a7801ce9c4ec2cb732f48895ad1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Expand documentation for CameraMichael Brasser2019-07-121-15/+88
| | | | | Change-Id: Id886decd4f2bd83a2319b4ad792a15b7280cb448 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Fix typo in property namePaul Wicking2019-07-101-1/+1
| | | | | | | | | colorbuffer -> colorBuffer Fixes: QTBUG-76342 Change-Id: Ic63ac9b333710ebab17aa7c4ccd9e864f10e6fcf Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Document unit for FrameAction::triggeredMichael Brasser2019-07-031-2/+2
| | | | | | Task-number: QTBUG-74165 Change-Id: I4d3de42cddd8f6e1e6729cc16a52e135ab7fa3b1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Update code samples in 'Qt 3D Render Framegraph' documentationTopi Reinio2019-06-171-47/+81
| | | | | | | | | | | | The code snippets were outdated, referring to QML properties that do not exist. In particular, the Deferred Rendering section contains code that was based on an example that's since moved into tests. Adapt the code to match the updates done to that example and also mention where it originates from. Task-number: QTBUG-73024 Change-Id: I9ec750d05f8e853e5614f33dadcbe44a0b42e356 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Extend Qt3D documentationPaul Wicking2019-06-073-2/+56
| | | | | | | | | | | | | | | | This change adds missing C++ and/or QML documentation for: * enum QBuffer::AccessType * QBuffer::accessType() * QBuffer::dataAvailable() * ForwardRenderer::externalRenderTargetSize * enumeration Qt3D.Render.Light::type * Qt3D.Render.Light::color * Qt3D.Render.Light::intensity Fixes: QTBUG-73071 Change-Id: I48b13cb8001558b20bd801b6f96f5b5933144d82 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix removal of components when they are destroyedMike Krus2019-05-284-2/+34
| | | | | | | | | | | | | | | | | | | Automatic removal of components when they are destroyed is based on connecting to the destroyed() signal. This however means that by the time removeComponent() is called, the pointer is no longer a valid QComponent (just a QNode). While accessing member data of derived classes such as nodeId is fine, emitting signals from derived class does nothing, and in some cases asserts. Fix this by: - doing the QComponent clean up from it's destructor - implementing a separate method on QEntity to simply clear the now partly invalid pointer from the list. Change-Id: Id7632ee2ceaff6548c44c7a43ae40a0372febde9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix Parameter priority sortingPaul Lemire2019-05-241-3/+3
| | | | | | | Parameters defined on an effect have priority over those defined in a Technique. Change-Id: I49558a065b613d7ea9d1cbf0a64f6d5aad941cd3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Clean up warningsMike Krus2019-05-283-8/+9
| | | | | Change-Id: I1ddad305359586481021e85f6e4a470d3a6521b0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QClearBuffers: fix wrong clearColor qml property name in docPaul Lemire2019-05-241-1/+1
| | | | | Change-Id: I22ee256f266cb3359d1666e831d37b804d80d55a Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Update Qt3D color handlingMichael Brasser2019-05-153-2/+95
| | | | | | | | | | | | | | There have been a number of updates to QtQuick color handing that were not similarly updated on the Qt3D side (for example the addition of hsl* and hsv* properties). This led to different behavior depending on the imports used, where the Qt3D behavior did not match the basic color documentation. [ChangeLog][Quick3D] Update Qt3D color handing to match QtQuick. Task-number: QTBUG-75551 Change-Id: I13d163c2ada39dd8941351cb0cfa991618333ee1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Register Qt3DCore::QNode also for Qt3D.AnimationUlf Hermann2019-05-171-0/+2
| | | | | | | | | It's not pretty, but it makes the properties added to QNode in revision 9 available to derived animation types registered for version 2.9. Fixes: QTBUG-61942 Change-Id: I118d4c508f3c201d61983d3224ceaf79edaf8ee6 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Doc: Add MetalRoughMaterial QML documentationPaul Wicking2019-05-161-1/+50
| | | | | | Fixes: QTBUG-73072 Change-Id: Ifea7152c77c4f6f1759e4872001336bae6d3d2c3 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Add TextureLoader QML documentationPaul Wicking2019-05-151-2/+14
| | | | | | Task-number: QTBUG-73072 Change-Id: I66da2ab446d34b4385b883d640640263c15ad205 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Fix missing code snippet in Scene3DTopi Reinio2019-05-151-1/+1
| | | | | | | | scene3ditem.cpp: (qdoc) warning: Missing '\endqml' Fixes: QTBUG-75805 Change-Id: I4c26465d49dc2203e79cc680c34a7e5c0ed25bfc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Check if animation channel only have one component and shortcircuitJuan Jose Casafranca2019-05-141-3/+3
| | | | | Change-Id: I6f80d3378fe3002142e2d84d410bcbf356cb02ea Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix number of lightsMike Krus2019-05-131-1/+1
| | | | | | | | When an environment map is in use, no extra light is added and the count should be 0. Change-Id: Ieb14c48dd9627530b7b7b0682a20096237635d4d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QChannelMapping: only send const char *propertyName to backendPaul Lemire2019-05-105-12/+6
| | | | | | | | | | It was otherwise sending a QString property as well as the const char *propertyName. Given only propertyName is actually used, remove QString property from the backend to avoid useless confusion and stop sending the notification change. Change-Id: Ie26771e320e26d44d7fce3e0a864bad1d4df558f Reviewed-by: Mike Krus <mike.krus@kdab.com>