summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * Use animation rather than event to drive simulationMike Krus2020-01-133-9/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using events can be problematic as they contribute to flooding of the event queue leading to issues with running animations. So we now use an actual animation which runs in a loop and triggers every 1ms (rendering still vsync locked though). If animation have not been enabled for the qt build, we fall back to using events as before. Tests were changes since frame progress is no longer driven by events, so processEvents does not trigger a frame update. Change-Id: I89b11862ef432dffae0c3dfb140eedd61754697e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Fix for incorrect QML property names in GeometryRenderer docVolker Enderlein2020-01-131-2/+2
| | | | | | | | | | | | | | | | | | restartIndex property has been renamed to restartIndexValue primitiveRestart property has been renamed to primitiveRestartEnabled Fixes: QTBUG-70433 Change-Id: Ide5d01407d76bed752fb0bcaa8258e58871fafb1 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * Add viewAll support for orthographic projection modeVolker Enderlein2020-01-102-10/+26
| | | | | | | | | | | | | | | | | | | | | | - viewAll was not supported for orthographic projection mode - Fix viewAll for perspective projection mode - the bounding volume was not fully visible in the render view after applying viewAll Task-number: QTBUG-80078 Change-Id: Ibf7486e41b02997b6b7426bde9a86b2d6c0d2e06 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Add QRenderCapabilities to query GL about what is supportedMike Krus2020-01-2013-27/+738
| | | | | | | | | | Change-Id: I7981e7e4b514e5d15d66c82351f1ab2fe160d20d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add Profiling OverlayMike Krus2020-01-1733-34/+29677
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Can be activated at adding a QDebugOverlay in the frame graph to identify which surface it should be renderer one (renders only once on first branch that contains such a node). Can be also activated on the forward renderer from Qt3DExtras. - Shows information about FPS and number of jobs/renderviews/commands/vertices/entities/geometries/textures... - Allows to toggle job and gl call tracing and open folder where trace files are stored - Windows to show and dump glinfo and renderview/command details to the console Change-Id: I286ff85760e8f8f0604a23458883ff22229bda94 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Replace deprecate QNetworkReply::error() callTimur Pocheptsov2020-01-151-1/+1
| | | | | | | | | | | | | | | | with QNetworkReply::networkError(). Task-number: QTBUG-80369 Change-Id: I6ab7e6b68b1bad33fc4c410894f6ba62d940255d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Fix deprecation handlingMike Krus2020-01-1431-1/+55
| | | | | | | | | | | | Change-Id: If981333f7a3d78028d4f08c59867453d4192b955 Task-number: QTBUG-81058 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Remove use of messages for RayCasterMike Krus2020-01-131-10/+2
| | | | | | | | | | Change-Id: Ibe0b38df62700608135788331adfcb7fa28159a7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add commands to dump frame graph and scene graphMike Krus2020-01-096-1/+132
| | | | | | | | | | | | | | | | prints to the console, also dump the list of paths in the frame graph to help understand render views. Change-Id: Ic4756e09545971b224a239fafc6667b0ca3d4572 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Silence deprecation warnings and fix Qt for Python and documentation buildsFriedemann Kleint2020-01-033-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merely addding DEFINES -= BUILD_QT3D_MODULE to an example results in a deprecation warnings flood despite the example not using any deprecrated API since for example the flag operators and usages in the headers cause warnings by itself. Remove the deprecation from smart pointer typedefs (it should be sufficient to deprecate the pointee class) and disable warnings for usages of deprecated enumerations. This change silences the build of the simple-cpp example with BUILD_QT3D_MODULE removed, more changes might be required to fix the report. Task-number: QTBUG-81058 Change-Id: Ie70c14cfef024a25b6b1330fe013ce57c69dc962 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Fix compilation with MSVCFriedemann Kleint2020-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove the deprecation introduced by 6e448dd5918c70ddfd0d52f62522fa49c02e8ba8 since it does not compile with MSVC nor the clang parsers used for qdoc and Qt for Python on Windows. It should be sufficient to deprecate the pointee class. Note the error does not show within Qt3D since the define BUILD_QT3D_MODULE in .qmake.conf causes Q3D_DECL_DEPRECATED to be empty. Task-number: QTBUG-81058 Change-Id: I844cbdabc8cdd2155e7ae9c6058d93a4dd826434 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-281-1/+1
|\| | | | | | | Change-Id: I41981a6e58046ad1b8e9870c789f6d46dce9accc
| * QDistanceFieldMaterial: Use a smaller Z offsetMartin Andersson2019-12-181-1/+1
| | | | | | | | | | | | | | | | The previous Z offset was too large because it sometimes caused the text to be placed on top of objects it was supposed to be under. Change-Id: I99bde5a93ea8c6443b1195d818075cebf3d082a4 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | QSortPolicy: add Uniform sorting modePaul Lemire2019-12-203-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | We used to perform uniform minization between adjacent render commands all the time. Since this can yield to a higher CPU usages (but more efficient rendering submission), we now make this step optional. [ChangeLog] QSortPolicy add Uniform mode (to control whether uniform minization should be performed) Change-Id: I5c0e0dba22400a9884ee1d75426fd76b073fdcb5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Expand System InformationMike Krus2019-12-182-4/+31
| | | | | | | | | | | | | | | | | | Add methods to: - Reveal folder where trace files are saved in the file browser - Dump the output of commands to the console Change-Id: Iaad76b4db93dbf60df170aa53212a8f4df1b2283 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge "Merge branch '5.14' into 5.15"Paul Lemire2019-12-184-26/+14
|\ \
| * | Merge branch '5.14' into 5.15Paul Lemire2019-12-184-26/+14
| |\| | | | | | | | | | Change-Id: Iee3ca407250b942208f3beaf21d0e58a632f1095
| | * RenderViewBuilder: fix leak with EntityRenderCommandDataPaul Lemire2019-12-164-26/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EntityRenderCommandData would only be released in a separate job than the one it was allocated in. However this would only happen if there was at least a single renderable objects after filtering. In case there was no renderable following filtering, the EntityRenderCommandData was leaked. To fix the issue and make it less error prone, we now switch to using shared pointers to avoid having to handle all possible leak cases with raw pointers. Change-Id: I842d50d2b35ebba8303f6d6c4e72a2427ce31da3 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Make GL profiling a runtime optionMike Krus2019-12-186-62/+138
|/ / | | | | | | | | Change-Id: I6cf9007132aa9867fd7046e7e641d849ee141e28 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Expose number of jobs is last updateMike Krus2019-12-174-5/+10
| | | | | | | | | | | | | | Useful for tracking amount of work done Change-Id: I1d6e0394c35fffc4b33991373e4d16e4651987c7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Move AspectCommandDebugger to system service, activate command executerMike Krus2019-12-1712-96/+67
| | | | | | | | | | | | | | | | | | | | | | - Always compile in AspectCommandDebugger and CommandExecuter - AspectCommandDebugger start when QT3D_COMMAND_SERVER_ENABLED is set - System information service becomes entry point for commands from the debugger - Added commands to enable and disable tracing Change-Id: Ic0d7fe72fa8a118a43ca348ca4284595a71827a4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Update textures and disables in postJobsMike Krus2019-12-162-22/+13
| | | | | | | | | | | | | | | | Work was done in postFrame() in main thread anyway, so reduce amount of jobs slightly Change-Id: I8bbb3efcaf9246eb8df1033bde133bc16233f889 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-1419-66/+183
|\| | | | | | | Change-Id: I5a5b1d497430afdd0fe11933832a2477a7efbe30
| * RenderView: fix leak with m_statesetPaul Lemire2019-12-131-0/+1
| | | | | | | | | | Change-Id: I368935178c285b9beb609083b93ae4621c70e28e Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * QText2DEntity: Support display of empty stringsVolker Enderlein2019-12-131-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The DistantFieldTextRenderer of a QText2DEntity was not properly updated for empty strings. The dereferencing of previous QGlyphRuns needs to be done before the number of DistantFieldTextRenderers is adjusted as a DistandFieldTextRenderer may be the parent of a QTextureAtlas that is referenced by a Glyph. Task-number: QTBUG-80569 Change-Id: I0dba8b749148bef088864dc7200ae0513965745a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Merge remote-tracking branch 'origin/5.14.0' into 5.14Qt Forward Merge Bot2019-12-136-11/+41
| |\ | | | | | | | | | Change-Id: Ibf5f508eec94be4bae2df3ce2e1511de696dcd72
| | * Fix OnDemand rendering with Scene3Dv5.14.0-rc2v5.14.0Paul Lemire2019-12-046-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using OnDemand rendering, Scene3D would lock if nothing in the scene were to change. By being blocked, it would also not process jobs for other aspects (input, logics). That would prevent things like a CameraController from running, which in turn would make it impossible to move the camera and trigger a change in the scene to request rendering. Additionally, Scene3D would ignore whether the Qt3D renderer actually needed rendering or not as it was watching on its own the changeArbiter for changes to decide whether rendering was required or not. This would ignore the case where Qt3D needs multiple frames to render a correct frame (e.g loading buffers, shaders at frame n, rebuilding commands at frame n+1) Scene3D now asks the Qt3D renderer by calling the shouldRender() function to decide whether rendering is needed or not, in addition to watching the changeArbiter. Regardless of whether rendering is needed, it now let each aspect process jobs. This ensures things like FrameAction/Input are processed. Then, Scene3D decides whether full rendering is required or whether it only has to be called to allow the Qt3D simulation loop to proceed for the next frame. If the latter, it does it so as not to have QtQuick trigger a redraw. Change-Id: I870f773c224286d6b7ec0f6045319e51e09cbf8e Task-number: QTBUG-80521 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: Volker Enderlein <volker.enderlein@ifm-chemnitz.de> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Always get the estimate primitive count from the attributeMike Krus2019-12-131-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously were checking that the attribute was actually but due to refactoring the shader is not yet examined at this point. With this change, we always get the estimated number of points from the attributes. Potentially it means we're getting it from an attribute that is not being used but the user should then set the correct number on the geometry renderer anyway. Task-number: QTBUG-80697 Change-Id: Ie34131fe3ff41b34609a2f2eb95c4ff678424036 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | qquaternionanimation.cpp: Fix warning suppressionFriedemann Kleint2019-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quote the option, fixing g++ 8.3 warning about: qquaternionanimation.cpp: In member function ‘void Qt3DCore::Quick::QQuaternionAnimation::setType(Qt3DCore::Quick::QQuaternionAnimation::Type)’: qquaternionanimation.cpp:147:44: warning: missing option after ‘#pragma GCC diagnostic’ kind [-Wpragmas] QT_WARNING_DISABLE_GCC(-Wcast-function-type) ^ qquaternionanimation.cpp:148:107: warning: cast between incompatible function types from ‘QVariant (*)(const QQuaternion&, const QQuaternion&, qreal)’ {aka ‘QVariant (*)(const QQuaternion&, const QQuaternion&, double)’} to ‘QVariantAnimation::Interpolator’ {aka ‘QVariant (*)(const void*, const void*, double)’} [-Wcast-function-type] d->interpolator = reinterpret_cast<QVariantAnimation::Interpolator>(&q_quaternionNlerpInterpolator); Amends 698bd5f22c79ecf777a0abe57a36676dc49fa8f3. Change-Id: Ia68e2b5b198e658ef7ce9e930d8f3d4bd77fd2d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Doc: Add note about implementation specific property meaningPaul Wicking2019-12-104-18/+84
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-73095 Change-Id: I843b0376ed0e4ece6ef949acb596a0303aac977d Reviewed-by: Andy Shaw <andy.shaw@qt.io>