summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add missing QPainterPath includesUlf Hermann2020-03-112-0/+2
| | | | | | | Change-Id: I315a4b0615830ae32915a3c2e0ff6ad54b6d15fd Fixes: QTBUG-82792 Reviewed-by: Tuukka Turunen <tuukka.turunen@qt.io> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Allow Qt3DWindow to choose which graphics API to use on constructionJean-Michaël Celerier2020-03-119-13/+140
| | | | | Change-Id: Id3ff72a2eaa7f85844a546ef55dc3e1b71a14659 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add missing documentationMike Krus2020-03-103-2/+468
| | | | | Change-Id: I68d386671c271462a4b156ba9e0f61222a9c79c3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge gatherer and caching jobsMike Krus2020-03-065-75/+45
| | | | | | | Avoid extra thread sync just for copying data around Change-Id: Ib119115bbb3a7a8a2aa99a3e271595caecc371f7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move common job handling out of RendererMike Krus2020-03-0610-243/+273
| | | | | | | | | Should be done in aspect as it's independent of the backend. Moved some tests to separate test using an empty renderer as other backends are likely to have different jobs. Change-Id: I2bec0939045acea7b91ecb1622ba18bf9f5db3c6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Fix incorrect use of \default QDoc commandTopi Reinio2020-03-054-17/+17
| | | | | | | | | | | | | The command, despite its name, does not document a default value of a property or a parameter. Instead, it's specific to QML properties, marking a property as a default QML property. Replace incorrect use of the command with descriptions of default values. Fixes: QTBUG-82645 Change-Id: I5b457062ffe2e8d81c358119e6bebc11b0063090 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix memory leaksMike Krus2020-03-043-9/+24
| | | | | | | | | | | Some jobs get skipped because they don't have anything to do. However, since the runnable does not get submitted to the pool, it would leak (along with the job it points to). Also fixed a couple of compile warnings. Change-Id: I7a25649f2f760c0593862328c0ab905da98c982a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Reduce concurrency in bbox evaluationMike Krus2020-03-031-109/+154
| | | | | | | | | | | Previous code created a list of all entities in the scene graph and iterated on that, ignoring the not-dirty ones. This now only collects the dirty ones before iterating on the resulting list. Should greatly reduce concurrency in large scenes. Change-Id: I838a5c9f8e6eb6d35b057a01c8a02585665599f0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-273-6/+6
| | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I685be5c4f16e7acfb38deafe3b92cfadb3a42188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Fix typo in updateAxesContinuouslyKai Koehne2020-02-261-2/+2
| | | | | Change-Id: I34233db4540c7f6d31cc508ad541cd4d682a08ec Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Remove GL tracing optionMike Krus2020-02-251-13/+10
| | | | | | | and reorganise the UI for consistency. Change-Id: I68070d8f2d6416c59074d85028c693a2be663608 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Revert "Replace deprecate QNetworkReply::error() call"Timur Pocheptsov2020-02-241-1/+1
| | | | | | | | | This reverts commit 34cb77c210316dd254a8aa27052fb03223e3f7af. Naming in QProcess is considered to be the correct one and the rule. Change-Id: I75f267b4f8dcc991b0d4945752b48de1b4e5b386 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Show non-required jobs as dottedv5.15.0-beta1Mike Krus2020-02-171-0/+6
| | | | | | | | Jobs that are in the graph but will not be scheduled (because they have nothing to do) are showed in dashed line Change-Id: Ia5d3b1b2b17d55820965b473099c0363cb645daf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make sure RenderViewCommandUpdaterJobs only run when necessaryMike Krus2020-02-172-1/+31
| | | | | | | | | | | There's a large amount of those and they don't seem to have much to do, so only actually schedule them when necessary. Also reset the job instance counter to zero after each frame, helps counting how many they are in the graph dumps. Change-Id: I9bbc30f8277ed4204a4150eddd68b36396965281 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix and improve FBO handlingPaul Lemire2020-02-175-29/+95
| | | | | | | | | | | | | | FBO need to be rebuild when one of the attachments directly or indirectly changes. By direct change we mean one of the FBO attachment texture being resized or the list of attachments changing. By indirect we mean when texture resource is recreated internally by the engine. Failure to handle this cases resulted in FBO referencing invalid attachments. Change-Id: I8dd4c08e464eed7fb0eeefd61a4158304ab4245f Task-number: QTBUG-64757 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix job dependenciesMike Krus2020-02-141-0/+1
| | | | | Change-Id: Iacfa40bf887e4846450da5cc1983d35be42b8e81 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add ability to dump job graph to dot fileMike Krus2020-02-1413-31/+101
| | | | | | | | | Can be triggered from the overlay API and using sending a "dump jobs" command to the aspect engine. Gets saved in the current working directory. Change-Id: I19fc94a1215187c1d7eb9d1f3b13b968939cc917 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Skip RenderView which don't need to be submittedPaul Lemire2020-02-143-0/+28
| | | | | | | | | | | | | This is when a particular set of filters/layers ... result in a renderview that has no render commands to submit. Trying to submit such renderview is just a waste of time. RenderViews that have no commands but do buffer download, back buffer clearing, setting fences .... are still submitted even if there are no commands to render. Change-Id: I4f66334b9b2170249c7c7aae1024ebccc8427750 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add flag to jobs to indicate if they need to run or notMike Krus2020-02-1413-27/+102
| | | | | | | | | | | | | | | | | | | Once aspect jobs are inserted in the queue, they will always run, but some of them don't actually have anything to do at every frame. Ideally, when building a graph of jobs, you would include only jobs that are required. However this makes building the graph more complicated. This introduces a method on the private job pimple which indicated if the job actually has something to do or not. When the scheduler is ready to run a job, it will call that method. If there's nothing to do, then the job will be skipped and the dependent jobs (if any) run instead. Change-Id: Iaa8d3d064f03d8c0bab407879a9acea292a06784 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Show geometry renderer id in draw commandsMike Krus2020-02-142-1/+3
| | | | | | | Along with dump of scene graph, helps understand what gets drawn Change-Id: I41223b633d20d3d8ee81f5a08aab2cd8e436647e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Destroy FBOs when RenderTarget node is destroyedPaul Lemire2020-02-137-1/+89
| | | | | | | | It appears we never destroyed FBOs which lead to bugs when destroying and recreating a RenderTarget Change-Id: I507b045d9b9e1088ff49f719c8846cc43c4fc8f2 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* FrameGraph dumping: handle nesting of non FG childrenPaul Lemire2020-02-131-15/+67
| | | | | Change-Id: Ie48d5de80fc4f5cd007de1e3caa43c65ee3d7783 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Shader fixesPaul Lemire2020-02-135-11/+39
| | | | | | | | | | | | - Make sure that shaders marked for destruction are un marked from destruction if recreated before having been destroyed. - When loading shaders, make sure the shader wasn't already loaded when loading it. This can happen is a shader is abandoned and then re adopted. Change-Id: I04597479d782bc6d31e4c7f78425c02c31217c7e Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Animations: handle colors as vec3 or vec4Paul Lemire2020-02-121-4/+12
| | | | | Change-Id: If450816fadce4adad4881938ecaea9c4000afe16 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Restore include of QOpenGLTexture for Qt 5 in public headerv5.15.0-alpha1Friedemann Kleint2020-02-101-2/+6
| | | | | | | | | The module path needs to be specified for Qt for Python to build. Amends 0159963cf5072e05d068fd7a9b58085ac70021c1. Change-Id: I5b030752cbe321d293985167e665cdcdc0c4c230 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* img-gui: remove non existing .h from priPaul Lemire2020-02-101-2/+1
| | | | | Change-Id: Ia861c018644d08ae6fd40bce3b476d57aa31e593 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Remove unneeded export of inline functionsFriedemann Kleint2020-02-072-5/+5
| | | | | | | | | Fix MinGW-warings src/core/transforms/matrix4x4_sse_p.h:485:50: warning: inline function 'Vector3D Qt3DCore::operator*(const Qt3DCore::Matrix4x4_SSE&, const Vector3D&)' declared as dllimport: attribute ignored [-Wattributes] Q_3DCORE_PRIVATE_EXPORT Q_ALWAYS_INLINE Vector3D operator*(const Matrix4x4_SSE &matrix, const Vector3D &vector) Change-Id: Ib8b39c613ce05b6dc3848c1251a88eea53903212 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge "Merge remote-tracking branch '5.14' into 5.15"Mike Krus2020-02-063-1/+8
|\
| * Merge remote-tracking branch '5.14' into 5.15Mike Krus2020-02-053-1/+8
| |\ | | | | | | | | | Change-Id: I76b7e29d240b89e27ef509b30cc3cd622f281fc9
| | * Fix stale Entity cachesPaul Lemire2020-01-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure we mark the internal state as dirty when Entities get cleaned up. We could otherwise end up with stale caches referencing Entity's that have been cleaned up (referencing null bounding volumes ...) Change-Id: Ia2d2c67f8635e28690f33c0a7d4c9ff1de0eb471 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| | * Fix potential crash when logic aspect exitsMike Krus2020-01-272-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Logic aspect does work in response to posted event. By that time the aspect may be gone (due to normal shutdown) and the scene pointer be invalid. Change-Id: Ia9454532a7c95cd3c00e8b225b8d95c178471a67 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Remove QtGui module path from OpenGL related pathsMike Krus2020-02-0610-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | Many are moving to opengl module in qt6, will make merging easier. Change-Id: I0ad08510e6999a5d887d9197fe2cb0dc21919fb9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Move frame profile to GL pluginMike Krus2020-02-054-3/+4
| | | | | | | | | | | | | | | | | | | | | It's only used there and depends on OpenGL Change-Id: If3d93fd0b12a6f41a751beb12b89d6763107de1b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Use QT3D_RENDERER env var to load different renderer pluginsPaul Lemire2020-02-051-1/+7
| | | | | | | | | | | | | | | Change-Id: Ib66ebc77f4926b2ea1e956762ec0f286162a95e6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Move classes in OpenGL renderer plugin into an OpenGL namespacePaul Lemire2020-02-0578-211/+439
| | | | | | | | | | | | | | | Change-Id: I5314da1df7fbfd1b6db4412e7bc71231525d9de2 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Make the OpenGL renderer a pluginPaul Lemire2020-02-05218-439/+1429
|/ / | | | | | | | | | | | | | | By default the QRenderAspect will try to load this plugin Change-Id: Ie55e207fb8e6d0b64f717bbb99699eb669eaa3f2 Task-number: QTBUG-61151 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | ResourceAccessor: make it work with the modular renderer architecturePaul Lemire2020-02-039-81/+113
| | | | | | | | | | | | | | This makes Scene2D work again. Tests restored as well. Change-Id: I4082d362c999a674be2debc297d59075f4b7c9e9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Renderer: stop passing buffer type aroundPaul Lemire2020-02-033-15/+11
| | | | | | | | | | | | | | It only make sense to pass it for the bind call Change-Id: I8f0cd204c109b2ff24f4eec320811b6cecaf3873 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QShaderProgram: add a format propertyPaul Lemire2020-02-036-1/+74
| | | | | | | | | | | | | | | | | | Can be either GLSL (default) or SPIRV at the moment. This variable will be used by the rendering backend to know what type of shader code was provided (e.g with Vulkan, the GLSL could be internally converted to SPIRV) Change-Id: I1f9b734a675c581ef0721edc4464e466a18afbb0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Introduce a GLShader classPaul Lemire2020-02-0329-715/+960
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLShader is renderer specific shader implementation for OpenGL. Shader now contains only backend information for a QShaderProgram frontend node. - Similar to the GLTexture handling, a generic adopt/abandon manager for shaders was introduced (regardless of the actually GraphicsAPIShader class). - The renderer and renderviews were adapted to the new changes. This was the last major thing preventing the modularisation of the QRenderAspect and renderers Change-Id: If671d60928b433977e9d6e5c58199827f9408a3f Task-number: QTBUG-61151 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Add dedicated managers holder for GL ResourcesPaul Lemire2020-02-0325-196/+343
| | | | | | | | | | | | | | | | | | | | | | That way NodeManagers only refers to managers holding nodes (so can be used by aspect and all renderer) and GLResourceManagers refers to renderer specific resources. Note: the Scene2D resourceaccessor was making direct access to GL resource through the managers, this has been commented and will be restored later. Change-Id: Ic32784f60eac35aab8c066d1769f078639fa25b8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Deprecate functor APIsMike Krus2020-01-316-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Unit tests for qschedulerPaul Lemire2020-01-281-1/+1
| | | | | | | | | | Change-Id: Iaa26160736bc6b92ecf0be767cb289d776cf46ad Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | QMouseDevice: add updateAxesContinuously propertyPaul Lemire2020-01-286-2/+55
| | | | | | | | | | | | | | | | | | | | | | The default behavior is to only update axes when one of the mouse buttons is pressed. This property, when enabled, allows to record X/Y axes value changes regardless of the state of the mouse buttons. [ChangeLog] QMouseDevice add updateAxesContinuously property Change-Id: Ib54a1e54c6c278ea08722760c2d317ec46437b2f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | QScheduler: restore jobsDone() call at the endPaul Lemire2020-01-281-0/+3
| | | | | | | | | | | | | | Mistakenly removed in a cleanup commit Change-Id: Icfb7c370017facf6ce990430c3df1535a0a72973 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | QRenderCapabilities: Fix include directivesFriedemann Kleint2020-01-281-2/+2
| | | | | | | | | | | | | | | | Add the missing module, which broke the Qt for Python build. Amends 4ae7cc93b503cc31272f0b55c84410af30aea8b9. Change-Id: I7b50432c4c2f0fb8eadcd3445f2de66d21caafde Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Clean up tracing codeMike Krus2020-01-2711-27/+32
| | | | | | | | | | | | | | | | | | | | - Removed some old optional timing code. - Separated jobsDone into 2 parts since, on single threaded rendering mode (ie macOS), the render aspect blocks until the next vsync which confuses tracing Change-Id: Icb641e3f8079da2cb9af0416b0f7c4dc4dd36c3c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Make sure debug overlay is disabled by defaultMike Krus2020-01-271-0/+1
| | | | | | | | | | Change-Id: If86115308a403e7fa7950488a8ca6c8dac966c1e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge remote-tracking branch 5.14 into 5.15Mike Krus2020-01-258-24/+86
|\| | | | | | | | | | | | | | | | | | | * origin/5.14: Fix usage of C++14 features Use animation rather than event to drive simulation Fix for incorrect QML property names in GeometryRenderer doc Add viewAll support for orthographic projection mode Change-Id: I397bdee907389a6f5cabb8390a805fa9a89ed4ca
| * Fix usage of C++14 featuresMike Krus2020-01-142-4/+4
| | | | | | | | | | Change-Id: Ibd460eceafdd29d7d88ac2418496dc7002de1095 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>