aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-05-30 20:56:58 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-02 15:57:06 +0200
commit58f1b93107e7d885329a292d6cb308d7c5435a0e (patch)
tree4d24f2e9c395b3a7e2cd874ae1e69b4c334da0cb /src/quick/doc
parent13caceba0e4cba30567058641a9999948858b182 (diff)
docs: Clean up some 5.14-era RHI-being-optional references
Change-Id: Ic46382263c3b12d3b4d158d6e269192508d01924 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/quick/doc')
-rw-r--r--src/quick/doc/src/concepts/visualcanvas/adaptations.qdoc30
-rw-r--r--src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc44
-rw-r--r--src/quick/doc/src/concepts/visualcanvas/topic.qdoc13
3 files changed, 41 insertions, 46 deletions
diff --git a/src/quick/doc/src/concepts/visualcanvas/adaptations.qdoc b/src/quick/doc/src/concepts/visualcanvas/adaptations.qdoc
index 86292921a6..d07885e6ad 100644
--- a/src/quick/doc/src/concepts/visualcanvas/adaptations.qdoc
+++ b/src/quick/doc/src/concepts/visualcanvas/adaptations.qdoc
@@ -31,8 +31,8 @@
\section1 Scene Graph Adaptations in Qt Quick
-Originally, Qt Quick always relied on OpenGL (OpenGL ES 2.0 or OpenGL 2.0) to
-parse the scene graph and render the results to a render target
+In Qt 5.0, Qt Quick always relied on OpenGL (OpenGL ES 2.0 or OpenGL 2.0) to
+parse the scene graph and render the results to a render target.
From Qt 5.8 onwards, Qt Quick also supports rendering in software, and with
OpenVG. This is realized by having additional scene graph adaptations, either
@@ -48,15 +48,19 @@ Shader handling is also unified by writing shader code once, compiling to
\l{https://www.khronos.org/spir/}{SPIR-V}, and then translating to the language
appropriate for the various graphics APIs.
+Starting with Qt 6.0, the RHI-based rendering model is the default, and there is
+no option to fall back to directly using OpenGL.
+
\target Switching Between the Adaptation Used by the Application
\section1 Switch Between Adaptations in Your Application
-Unlike \c software, the RHI-based renderer is not an additional
-adaptation, and is always built-in. As of Qt 5.14 it can be enabled by setting
-the environment variable \c{QSG_RHI} to a non-zero value before starting the
-application, or via \l QQuickWindow::setSceneGraphBackend() in combination with
-\l QSGRendererInterface::GraphicsApi. When none of this is done, OpenGL is used
-directly like in previous versions.
+Unlike \c software, the RHI-based renderer is not an additional adaptation, and
+is always built-in. As of Qt 6.0 it is always enabled. On platforms where
+multiple graphics APIs are available, the scenegraph makes a platform-specific
+choice. If this is not desired, applications can force a specified graphics API
+by setting the environment variable \c{QSG_RHI_BACKEND} or via \l
+QQuickWindow::setSceneGraphBackend() in combination with \l
+QSGRendererInterface::GraphicsApi.
Switching to a different adaptation can be achieved in two ways:
@@ -82,8 +86,9 @@ To find out which backend is in use, you can enable basic scene graph informatio
\c{QSG_INFO} environment variable or the \c{qt.scenegraph.general} logging category. This results
in some information being printed onto the debug output, during application startup.
-\note In Qt builds with OpenGL disabled, the default adaptation is \c software.
-This may change in future releases.
+\note In Qt builds with both OpenGL and Vulkan disabled, the default adaptation
+is \c software. This does not apply to Windows or \macos however, because these
+platforms always have Direct 3D or Metal support, respectively, enabled.
\note Typically, adaptations other than the default one come with a set of
limitations as they are unlikely to provide a feature set that's 100%
@@ -97,11 +102,6 @@ When using OpenGL directly, the default adaptation is capable of providing the
full Qt Quick 2 feature set. For more details, see
\l{qtquick-visualcanvas-scenegraph-renderer.html}{Default Adaptation}.
-When using OpenGL, Vulkan, Metal, or Direct 3D via the RHI, the default
-adaptation is capable of providing most features, including the full batching
-renderer described in \l{qtquick-visualcanvas-scenegraph-renderer.html}{Default
-Adaptation}, but some additional features may not be available as of Qt 5.14.
-
\section1 Software Adaptation
The Software adaptation is an alternative renderer for \l{Qt Quick} 2 that uses the raster paint
diff --git a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
index f312bde552..b06c972ddf 100644
--- a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
+++ b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
@@ -272,10 +272,11 @@ animations, process events, etc.
\endlist
The threaded renderer is currently used by default on Windows with
-opengl32.dll, Linux excluding Mesa llvmpipe, \macos with Metal, mobile
-platforms, and Embedded Linux with EGLFS, and with Vulkan regardless of the
-platform, but this is subject to change. It is always possible to force use of
-the threaded renderer by setting \c {QSG_RENDER_LOOP=threaded} in the
+Direct3D 11 and with OpenGL when using opengl32.dll, Linux excluding
+Mesa llvmpipe, \macos with Metal, mobile platforms, and Embedded Linux
+with EGLFS, and with Vulkan regardless of the platform. All this may
+change in future releases. It is always possible to force use of the
+threaded renderer by setting \c {QSG_RENDER_LOOP=threaded} in the
environment.
\section2 Non-threaded Render Loop ("basic")
@@ -284,9 +285,7 @@ The non-threaded render loop is currently used by default on Windows with
OpenGL when not using the system's standard opengl32.dll, \macos with OpenGL,
and Linux with some drivers. For the latter this is mostly a precautionary
measure, as not all combinations of OpenGL drivers and windowing systems have
-been tested. At the same time implementations like ANGLE or Mesa llvmpipe are
-not able to function properly with threaded rendering at all so not using
-threaded rendering is essential for these.
+been tested.
On macOS and OpenGL, the threaded render loop is not supported when building
with XCode 10 (10.14 SDK) or later, since this opts in to layer-backed views on
@@ -967,17 +966,16 @@ with multiple windows.
\section1 Rendering via the Qt Rendering Hardware Interface
- From Qt 5.14 onwards, the default adaptation gains the option of rendering
- via a graphics abstraction layer, the Qt Rendering Hardware Interface (RHI),
- provided by the \l QtGui module. When enabled, no direct OpenGL calls are
- made. Rather, the scene graph renders by using the APIs provided by the
- abstraction layer, which is then translated into OpenGL, Vulkan, Metal, or
- Direct 3D calls. Shader handling is also unified by writing shader code once,
- compiling to \l{https://www.khronos.org/spir/}{SPIR-V}, and then translating
- to the language appropriate for the various graphics APIs.
+ From Qt 6.0 onwards, the default adaptation always renders via a graphics
+ abstraction layer, the Qt Rendering Hardware Interface (RHI), provided by the
+ \l QtGui module. This means that, unlike Qt 5, no direct OpenGL calls are made
+ by the scene graph. Rather, it records resource and draw commands by using the
+ RHI APIs, which then translate the command stream into OpenGL, Vulkan, Metal,
+ or Direct 3D calls. Shader handling is also unified by writing shader code
+ once, compiling to \l{https://www.khronos.org/spir/}{SPIR-V}, and then
+ translating to the language appropriate for the various graphics APIs.
- To enable this instead of directly using OpenGL, the following environment
- variables can be used:
+ To control the behavior, the following environment variables can be used:
\table 100%
\header
@@ -986,16 +984,12 @@ with multiple windows.
\li Description
\row
- \li \c QSG_RHI
- \li \c 1
- \li Enables rendering via the RHI. The targeted graphics API is chosen based on
- the platform, unless overridden by \c QSG_RHI_BACKEND. The defaults are currently
- Direct3D 11 for Windows, Metal for macOS, OpenGL elsehwere.
-
- \row
\li \c QSG_RHI_BACKEND
\li \c vulkan, \c metal, \c opengl, \c d3d11
- \li Requests the specific RHI backend.
+ \li Requests the specific RHI backend. By default the targeted graphics API
+ is chosen based on the platform, unless overridden by this variable or the
+ equivalent C++ APIs. The defaults are currently Direct3D 11 for Windows,
+ Metal for macOS, OpenGL elsewhere.
\row
\li \c QSG_INFO
diff --git a/src/quick/doc/src/concepts/visualcanvas/topic.qdoc b/src/quick/doc/src/concepts/visualcanvas/topic.qdoc
index 677e5bd739..becbc718ce 100644
--- a/src/quick/doc/src/concepts/visualcanvas/topic.qdoc
+++ b/src/quick/doc/src/concepts/visualcanvas/topic.qdoc
@@ -59,12 +59,13 @@ Modern computer systems and devices use graphics processing units or GPUs to
render graphics. Qt Quick can leverage this graphics hardware by using graphics
APIs like \l{https://www.khronos.org/opengl/}{OpenGL},
\l{https://www.khronos.org/vulkan/}{Vulkan}, or
-\l{https://developer.apple.com/documentation/metal}{Metal}. The default
-graphics adaptation for Qt Quick requires OpenGL and it is used to display
-applications developed with Qt Quick in QML. In particular, Qt Quick defines a
-scene graph which is then rendered. See the documentation about the
+\l{https://developer.apple.com/documentation/metal}{Metal}. In Qt 6, the default
+graphics adaptation for Qt Quick supports multiple graphics APIs, such as OpenGL
+(ES), Vulkan, Metal and Direct 3D 11, to display applications developed with Qt
+Quick in QML. In particular, Qt Quick defines a scene graph which is then
+rendered. See the documentation about the
\l{qtquick-visualcanvas-scenegraph.html}{Scene Graph} for in-depth information
-about the concept of a scene graph and why it is beneficial, and about the
-scene graph adaptations provided by Qt Quick.
+about the concept of a scene graph and why it is beneficial, and about the scene
+graph adaptations provided by Qt Quick.
*/