aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickgraphicsinfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Promote suffixless graphics api enum values in GraphicsInfoLaszlo Agocs2020-11-061-6/+5
| | | | | | | | | Amends 23dbe3d6e0d3338812ad9f614028a6fdc5a54090. A similar change was done to QSGRendererInterface. Therefore the QML API should follow suit. Change-Id: I2f6d1aeefc17bf3b58b7683f46511d4433194e1c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Do a small doc update for GraphicsInfoLaszlo Agocs2020-06-151-2/+10
| | | | | Change-Id: I1e42e9e1ba08c37d7177ff5ca77410d9d6ecc612 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Make openglContext getter in QQuickWindow privateLaszlo Agocs2020-06-111-3/+2
| | | | | | | | | | | | Fix up the scenegraph and qquickwindow autotests as well. (direct OpenGL specifics are now completely removed from both, i.e. the remaning OpenGL specific tests are now run (and not skipped) with OpenGL-on-RHI) [ChangeLog][Qt Quick][QQuickWindow] openglContext() has been removed from QQuickWindow. Use QSGRendererInterface to query the QOpenGLContext. Change-Id: If5c9802b71ac5f9cffc695827e286eb2a2d03580 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Quick: Don't qualify OpenGL includes (part two)Johan Klokkhammer Helsing2020-02-181-1/+1
| | | | | | | | | | | | 406f15ce0e only removed the "QtGui" prefix from some includes, but we are trying to move (almost) everything OpenGL related from QtGui. This removes prefixes for additional QOpenGL includes (QOpenGLShaderProgram, versioned opengl functions etc.). Task-number: QTBUG-74409 Change-Id: I91e1feac0676859f11de9b75301a0a4e81db50d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove D3D12 scenegraph backendLaszlo Agocs2020-01-061-1/+0
| | | | | | Task-number: QTBUG-79925 Change-Id: Id3f0a688f47efaf1653c85d23ef49618ed09c931 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add the graphics api independent scenegraph portLaszlo Agocs2019-07-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opt in via environment variables: QSG_RHI=1 -> enable using QRhi instead of GL QSG_RHI_BACKEND -> set to vulkan, metal, d3d11, gl to override the default (the default is d3d11 on Windows, metal on Mac, gl elsewhere) Or force a given rhi backend via the existing QQuickWindow::setSceneGraphBackend(). Otherwise the default behavior is the same as before, the rhi code path is never active by default. -no-opengl builds are supported in the sense that they work and default to the software backend. However, the rhi code path cannot currently be used in such builds, even though QRhi from qtbase is fully functional with Vulkan, D3D, or Metal even when qtbase was configured with -no-opengl. This cannot be utilized by Quick atm due to OpenGL usage being all over the place in the sources corresponding to the default backend, and those host the rhi code path as well. This will be cleaned up hopefully in Qt 6, with the removal all direct OpenGL usage. Other env.vars.: QSG_RHI_DEBUG_LAYER=1 -> enable D3D debug or Vulkan validation layer (assuming the system is set up for this) QSG_RHI_SHADEREFFECT_DEBUG=1 -> print stuff from ShaderEffect QSG_SAMPLES=1,2,4,... -> MSAA sample count (but QSurfaceFormat works too) QT_D3D_ADAPTER_INDEX=0,1,... -> D3D adapter index QT_VK_PHYSICAL_DEVICE_INDEX=0,1,... -> Vulkan physical device index QSG_RHI_UINT32_INDEX=1 -> always use uint index data (both merged/unmerged, convert when needed - with some rhi backends this is implicit) QSG_RENDER_LOOP -> to override the render loop as usual. The default with RHI is threaded for Metal, threaded for Vulkan on Windows, basic for Vulkan on Linux and Android (to be checked later), while the existing rules apply for OpenGL. Not supported when running with QRhi: - particles - compressed atlases (though this is transparent to the apps) - QSGRenderNode - QQuickRenderControl - QQuickFramebufferObject - certain QQuickWindow functionality that depends directly on OpenGL - anisotropic filtering for textures - native text may lack some gamma correction - QSGEngine applicability unclear - some QML profiler logs may be incorrect or irrelevant Change-Id: I7822e99ad79e342e4166275da6e9e66498d76521 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-191-1/+1
| | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-1/+1
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-1/+1
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Unify ShaderEffect property settingLaszlo Agocs2016-06-291-19/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rendererInterface() should not require isSceneGraphInitialized() to be true - the API and language queries like graphicsApi() have no need for the scenegraph, they only need the plugin to be loaded, i.e. that the QQuickWindow is constructed. This is the key to be able to make GraphicsInfo report graphicsApi and shaderType with the correct values as early as possible - meaning as soon as the item is associated with a window. The initialization of the scenegraph (the exact timing of which varies backend to backend) does not matter here. The fragment and vertex shader property setting is now unified in the two ShaderEffect implementations: - If the component is complete, the shader is attempted to be processed right from the setter. - Otherwise the item will trigger processing once the component is complete. - If there is no window when processing is trigerred, it is deferred via polish. To implement item polish handling we need a new virtual in QQuickItemPrivate since we cannot intrdouce virtuals into the public classes. This way one can write a condition (and later potentially use file selectors) like this: fragmentShader: GraphicsInfo.shaderType == GraphicsInfo.GLSL ? "..." : ... without having to worry about getting an unintended value processed due to GraphicsInfo not yet reporting an up-to-date value. parseLog() forces, for GL at least, shader processing to prevent autotests from breaking. Change-Id: If55c69d746c29cd07348ddad2d6b0f2b5dd7f3a2 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add OpenGL prefixes to ContextProfile in GraphicsInfoLaszlo Agocs2016-06-021-5/+5
| | | | | | | Make it clear with the naming that this is specific to OpenGL. Change-Id: Ib2106c1539ee424a0d208d17c684c3bb9ad28fa9 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* One GraphicsInfo to rule them allLaszlo Agocs2016-06-011-0/+306
Rename RendererInfo to GraphicsInfo. Deprecate OpenGLInfo and move the surface format properties into GraphicsInfo. Move also the shader info properties from ShaderEffect. Change-Id: I3b3f01080e059b3a30a132fd67de19a4bfca54ef Reviewed-by: Andy Nichols <andy.nichols@qt.io>