aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickrendercontrol.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-06-12 13:23:37 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-12 16:17:14 +0200
commit19f30c3463f3a56773122d9a942ef14649d8963c (patch)
treec61f600b165860f81d04c960b59e38df4214656c /src/quick/items/qquickrendercontrol.cpp
parentee1101043f0da636bf76972232f384e599becd64 (diff)
Fix up QQuickRenderControl class docs
This was not updated together with the Qt 6 changes (the function docs are up-to-date already), do it now. Change-Id: I93c59df141a69d9943d1a3d88fe3a56fe6c096df Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/quick/items/qquickrendercontrol.cpp')
-rw-r--r--src/quick/items/qquickrendercontrol.cpp37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/quick/items/qquickrendercontrol.cpp b/src/quick/items/qquickrendercontrol.cpp
index 1f9161d70a..53c0b6b731 100644
--- a/src/quick/items/qquickrendercontrol.cpp
+++ b/src/quick/items/qquickrendercontrol.cpp
@@ -77,27 +77,30 @@ QT_BEGIN_NAMESPACE
QQuickWindow and QQuickView and their associated internal render loops render
the Qt Quick scene onto a native window. In some cases, for example when
- integrating with 3rd party OpenGL renderers, it might be beneficial to get the
- scene into a texture that can then be used in arbitrary ways by the external
- rendering engine. QQuickRenderControl makes this possible in a hardware
- accelerated manner, unlike the performance-wise limited alternative of using
- QQuickWindow::grabWindow()
+ integrating with 3rd party OpenGL, Vulkan, Metal, or Direct 3D renderers, it
+ can be useful to get the scene into a texture that can then be used in
+ arbitrary ways by the external rendering engine. Such a mechanism is also
+ essential when integrating with a VR framework. QQuickRenderControl makes this
+ possible in a hardware accelerated manner, unlike the performance-wise limited
+ alternative of using QQuickWindow::grabWindow()
When using a QQuickRenderControl, the QQuickWindow does not have to be shown
or even created at all. This means there will not be an underlying native
window for it. Instead, the QQuickWindow instance is associated with the
- render control, using the overload of the QQuickWindow constructor, and an
- OpenGL framebuffer object by calling QQuickWindow::setRenderTarget().
-
- Management of the context and framebuffer object is up to the application. The
- context that will be used by Qt Quick must be created before calling
- initialize(). The creation of the framebuffer object can be deferred, see
- below. Qt 5.4 introduces the ability for QOpenGLContext to adopt existing
- native contexts. Together with QQuickRenderControl this makes it possible to
- create a QOpenGLContext that shares with an external rendering engine's
- existing context. This new QOpenGLContext can then be used to render the Qt
- Quick scene into a texture that is accessible by the other engine's context
- too.
+ render control, using the overload of the QQuickWindow constructor, and a
+ texture or image object specified via QQuickWindow::setRenderTarget().
+
+ Management of the graphics devices, contexts, image and texture objects is up
+ to the application. The device or context that will be used by Qt Quick must
+ be created before calling initialize(). The creation of the the texture object
+ can be deferred, see below. Qt 5.4 introduces the ability for QOpenGLContext
+ to adopt existing native contexts. Together with QQuickRenderControl this
+ makes it possible to create a QOpenGLContext that shares with an external
+ rendering engine's existing context. This new QOpenGLContext can then be used
+ to render the Qt Quick scene into a texture that is accessible by the other
+ engine's context too. For Vulkan, Metal, and Direct 3D there are no
+ Qt-provided wrappers for device objects, so existing ones can be passed as-is
+ via QQuickWindow::setGraphicsDevice().
Loading and instantiation of the QML components happen by using a
QQmlEngine. Once the root object is created, it will need to be parented to