summaryrefslogtreecommitdiffstats
path: root/src/render/backend/nodemanagers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* NodeManagers: replace Q_DECL_NOEXCEPT/Q_DECL_NOTHROW by noexceptPaul Lemire2019-06-051-38/+38
| | | | | | | | | The macros aren't required since the switch to Qt requiring C++11 Change-Id: I7fa0a45322744934491005aa68f063f9607d53e7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Register QShaderImage in QRenderAspectPaul Lemire2019-06-051-0/+8
| | | | | | | | And add required ShaderImageManager Change-Id: I4b3347d6dc4b70690abea0486c933f5a508b057f Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Rework internal Texture HandlingPaul Lemire2019-03-041-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove internal GLTexture sharing - Remove dataFunctor data sharing - Simplify the overall texture process: 1) Look for dirty textures (either a property on QTexture or a referenced QTextureImage has changed) 2) Update GL Resources - Create a GLTexture for a given Texture if it doesn't exist - Update GLTexture to reflect Texture state - Perform actual GL texture creation and or upload (call functors at this point) - Cleanup GLTextures when matching Texture node has been destroyed This will provide an easier maintenance over time as it drastically simplifies the handling of textures and removes most of the coupling. Furthermore this will make it possible to send texture updates on a QTexture node to update texture content without having to declare QTextureImages which would not have been (or would have been a lot harder) to do. In practice, I doubt most people were even aware of the internal texture sharing in the first place. [ChangeLog][Qt3DRender] Textures: internal data sharing removed Change-Id: I02867c8105e29eb1e193884e3899062f795f32f4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Implement WaitFence/SetFence handling into the rendererPaul Lemire2018-10-121-0/+2
| | | | | | | | Slightly reorganize jobs between jobs needed for rendering and jobs that should run even when no rendering is required. Change-Id: I02d262efd8cb46c71c40ac6dbcd4d1b25bb725e1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch 'origin/5.10' into 5.11Sean Harmer2018-02-151-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Render: Use SIMD Vectors and Matrices in the backendPaul Lemire2018-02-021-1/+1
| | | | | | | | | | Change-Id: I19b3b2f8fcb06eb2bc600ebe370465dd15a8eabc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Initial implementation of ray casting APIMike Krus2018-02-011-0/+8
|/ | | | | | | | | Adds frontend and backend node classes and the registration mechanism in the render aspect. Change-Id: I258e25fea98170433c8ed9d3fad6868a83beda43 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix memory leakv5.10.0-beta3Jesus Fernandez2017-10-241-0/+1
| | | | | | | | | | | | The memory will not be reclaimed by the destructor, and it cannot be reused until the process terminates. In Qt3DRender::Render::NodeManagers::NodeManagers(): Constructor allocates memory but destructor does not free it (CWE-401) Coverity-Id: 184877 Change-Id: Ic1afa3d9c0270442ad0e2060acbdae01496463a7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add backend node for QJointSean Harmer2017-08-161-0/+8
| | | | | Change-Id: Ie06f41aefebf9c5c5d8dd8bcd68f9f352799ad18 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add basics of Skeleton backend node to render aspectSean Harmer2017-08-091-0/+8
| | | | | | | Loading of skeleton will be handled in a follow up commit. Change-Id: I4466524098e7cf33d6c39f70752d8bd632bac1f1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add Armature backend node to renderer aspectSean Harmer2017-08-081-0/+9
| | | | | Change-Id: I35caba55beb54f60dcf2870df4edb2b7eb19c3f5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Introduce ShaderBuilderKevin Ottens2017-07-051-0/+8
| | | | | | | | | | This is the backend counterpart to QShaderProgramBuilder. For now only provides the basic registration and handling of properties. The code generation part and its integration in the rendering will follow in the next commits. Change-Id: Iae57b3e8f0d54f5c24c541934655697937045847 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* OnDemand rendering: only skip rendering jobsPaul Lemire2017-05-191-1/+4
| | | | | | | | | As we still need to perform some of the jobs like picking, buffer loading.... Change-Id: Ic771533b6f114400fa431f6de5ad8259a2a17c71 Task-number: QTBUG-60738 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Cleanup scene2d - remove event forwardAntti Määttä2017-03-151-8/+0
| | | | | | | | | Remove event forward related stuff as they are no longer necessary after the mouse event changes. Task-number: QTBUG-58876 Change-Id: I2c9c52e41d5af3078d04ac9d5cc66753898e0ad9 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Add QEnvironmentLight into Qt3DRenderKevin Ottens2017-02-241-0/+8
| | | | | | | | | | This is a better API to set the environment lighting than what we currently have on the metal/rough materials. Still needs to be integrated in the renderer and to adjust the materials to make use of it. Change-Id: Ie1e46a0fa67916460147200c9cbbfbab8b037cee Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge branch 'wip/qtquickintegration' into devSean Harmer2017-01-291-0/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick3d/imports/render/qt3dquick3drenderplugin.cpp src/render/backend/triangleboundingvolume.cpp src/render/backend/triangleboundingvolume_p.h src/render/frontend/qrenderaspect.cpp src/render/frontend/sphere.cpp src/render/frontend/sphere_p.h src/render/jobs/pickboundingvolumejob.cpp src/render/jobs/pickboundingvolumejob_p.h src/render/picking/objectpicker.cpp src/render/raycasting/qcollisionqueryresult_p.h src/render/render.pro src/src.pro tests/auto/render/objectpicker/tst_objectpicker.cpp tests/auto/render/render.pro Change-Id: I95717c7855887850d5c90e7ad8f19f1ffb37a545
| * Add QEventForward node managerAntti Määttä2017-01-251-0/+8
| | | | | | | | | | | | Change-Id: I31cd1463b8c6fead18279754d99e876f6c71bb36 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Add resource accessor to backend node and nodemanagersAntti Määttä2017-01-201-0/+7
| | | | | | | | | | Change-Id: I483483ac0bb43dd7cb76c971a1141f0e4af64b34 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | LevelOfDetail (LOD) nodeMike Krus2017-01-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Component to control complexity of entities based on either distance to camera or size on screen. Given a specific camera, the LevelOfDetail computes the distance to the observer, or the screen size of the entity. The currentIndex property is updated to identify which of the entries in the provided array of distance or size ranges contains the current value. A disabled LevelOfDetail component will act as a simple (user controlled) switch. Updates are not done on disabled sub trees since their bounding boxes may not be valid. Change-Id: Ifa4c088de6b80b6a6ed203070411761574686cdb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | NodeManagers: fix invalid template specializationPaul Lemire2017-01-231-1/+1
|/ | | | | | | | | | | | | When we changed the way we handled VAO by creating the OpenGLVertexArrayObject class (which is a wrapper around QOpenGLVertexArrayObject), we adjusted the VAOManager to store OpenGLVertexArrayObject instead of QOpenGLVertexArrayObject pointers, the template specialization was not properly updated. This patch fixes that by using in the specialization the type that is actually being stored by the manager. Change-Id: I1b5fd20a1dddf4a8429aafdce4cc35488e77a379 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* TechniqueManager: move to dedicated filePaul Lemire2016-11-301-0/+1
| | | | | | | As we are going to add a few more methods to it Change-Id: Ie4024a48e559b3efc10f6df2a1bb0e1de39e226b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Texture: further refactoringPaul Lemire2016-11-141-1/+1
| | | | | | | | | Remove deep coupling between Texture and GLTexture The renderer is the only link between the two which should allow to reuse Texture with various renderers. Change-Id: I01e0a119744b9ec589c7b45d2ff482a70ea53d3b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Texture backend refactoring: Update node managersWieland Hagen2016-11-141-1/+6
| | | | | Change-Id: Ieacdf3115d5a823060b513bf28c5ec9bb4f44b43 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix memory leaks in render node managersAntti Määttä2016-05-261-0/+35
| | | | | | | | | | Delete objects in node managers. Task-number: QTBUG-47978 Task-number: QTBUG-51035 Change-Id: I55167dfa8c7b76ed6405bcb2b3bc775ca0152a5b Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Replace Q_DECL_NOEXCEPT by Q_DECL_NOTHROWPaul Lemire2016-05-231-31/+31
| | | | | | Change-Id: Ia991da557483704055e0ccf17b4a6b273568a1ba Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QTexImageData to QTextureImageDataFranck Arrecot2016-05-031-1/+1
| | | | | | | | Adding unit testing to QTextureImageData Task-number: QTBUG-51478 Change-Id: Icacdf8e5ba953eb2e637e46b16845745d06bd3ae Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix: restore FilterKeyManagerPaul Lemire2016-04-281-0/+7
| | | | | | | Which was mistakenly removed Change-Id: Ibd7c7e00085259f7f0bcf8b705633e8abc6daa59 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Moves QSortCriterion flag to QSortPolicy and remove itFranck Arrecot2016-04-261-14/+0
| | | | | | Change-Id: I44f71671ead23256d5fdc621545492885ff940a5 Task-id: QTBUG-51486 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move defaults and geometries out of Qt3DRender and into Qt3DExtrasPaul Lemire2016-04-231-6/+6
| | | | | | | QBoundingVolumeDebug has been disabled for now. Will be re-enabled later on. Change-Id: Id6b0abab2ec2aa697330bd20d782f9d104d25d50 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Finishing the rename of annotation manager to filterKey managerFranck Arrecot2016-04-061-3/+3
| | | | | | Task-id: QTBUG-51454 Change-Id: I7bafa7b568226e060b1cd5ce855946f5b27e7b63 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QComputeJob cleanupPaul Lemire2016-03-051-2/+2
| | | | | | | | | | | * Renamed to QComputeCommand * Removed protected ctor * Added x,y,z workgroup properties * Renamed backend elements to match frontend Change-Id: I3959ec671a7d6e86239f72336f02452ea58919ee Task-number: QTBUG-51514 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QRenderAttachment renamed to QRenderTargetOutputRobert Brock2016-03-031-1/+1
| | | | | | | As per API review Change-Id: Icaca9797c01100402e6d103be2a0425820a717ec Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Added QBackendNodes for QRenderStates.Wieland Hagen2016-02-051-0/+7
| | | | | | | | | | | | | RenderStateNode is the backend node for QRenderStates. The actual state-dependent behavior is implemented in subclasses of RenderStateImpl. Backend nodes for QRenderPass and QStateSet now hold IDs of the RenderState-nodes that they contain, instead of pointers. This means that every frame the RenderView has to get the actual backend nodes while building the RenderStateSets. This needs to be fixed. Change-Id: I908ce9763fdb9f4e851df8dbcecf5dc6ce5a4f49 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unify license header usageAntti Kokko2016-01-261-11/+14
| | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I8eac0cd6bbc276a56df487249cc459c0d4fab165 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* ComputeJobManager addedPaul Lemire2016-01-131-0/+7
| | | | | Change-Id: Ia3d1c209ea06ce6a6fd3aa87f4034d3eeaeffdda Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename UniformBuffer to GLBufferPaul Lemire2016-01-131-3/+3
| | | | | | | | This class could be reused for any kind of GLBuffer (not just uniform buffer) so rename it accordingly. Change-Id: I978696534f64fc3717ac135af94e9fe44aa23fba Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Lights phase 1: infrastructureLaszlo Agocs2015-11-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractLight becomes QLight and gets its own backend node. This way we can easily gather all lights for the scene and filter them when building render commands. Both the frontend and backend remain a subclass of (Q)ShaderData but will not be part of the ordinary ShaderData component list. This prevents mixing up ShaderDatas and Lights but allows reusing the same underlying infrastructure so that properties can automatically be transformed for example. It is worth noting that the position property for lights is now removed: the position is determined by the entity's (to which the light component belongs) position. A number of changes are made to ShaderData itself as backend subclassing with different managers is not straightforward. For now the distance between the rendered entity and the entity with the light component is calculated and lights will be chosen based on this distance. A framegraph node for controlling this will be added in future patches. No uniform setting or shader changes are included here. Task-number: QTBUG-48834 Change-Id: I43a6c5f9420d4254d798c558bd58680b2b09eceb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* NodeManagers class addedPaul Lemire2015-11-161-0/+264
The Renderer will have an instance of it so that the managing nodes part can be removed from the Renderer class (should make it easier to test in the long run). Change-Id: Ia85833adff5d0bb383b6cb7bc44869141e1d4985 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>