aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2022-08-04 12:35:29 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-04 23:14:21 +0000
commitf423ed8e4e6694a00982947dcd8fc0302dd8de3d (patch)
tree3f6e35190da6b1c60b0358600a2e053c92addbed /src/quick
parent438a114eb8e575f670ef60b689a9b08da59c052f (diff)
Clarify QSGRenderNode docs
It talks about connecting to beforeRendering, but that approach predates 6.0 where in the end QSGRenderNode got another overrideable function, prepare(). Mention both. Change-Id: I9e6fba6df38569917da3b3d318f9eb1894cceb9a Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit a3f0ae13a7e9530d150830c371829912bbf285d6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/scenegraph/coreapi/qsgrendernode.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgrendernode.cpp b/src/quick/scenegraph/coreapi/qsgrendernode.cpp
index 855eba8506..bbdfff0f7c 100644
--- a/src/quick/scenegraph/coreapi/qsgrendernode.cpp
+++ b/src/quick/scenegraph/coreapi/qsgrendernode.cpp
@@ -239,13 +239,14 @@ void QSGRenderNode::prepare()
Assume nothing about the pipelines and dynamic states bound on the command
list/buffer when this function is called.
- With some graphics APIs it can be necessary to also connect to the
- QQuickWindow::beforeRendering() signal, because that is emitted before
- recording the beginning of a renderpass on the command buffer
- (vkCmdBeginRenderPass with Vulkan, or starting to encode via
- MTLRenderCommandEncoder in case of Metal). Recording copy operations cannot
- be done inside render() with such APIs. Rather, do it in the slot connected
- (with DirectConnection) to the beforeRendering signal.
+ With some graphics APIs it can be necessary to reimplement prepare() in
+ addition, or alternatively connect to the QQuickWindow::beforeRendering()
+ signal. These are called/emitted before recording the beginning of a
+ renderpass on the command buffer (vkCmdBeginRenderPass with Vulkan, or
+ starting to encode via MTLRenderCommandEncoder in case of Metal. Recording
+ copy operations cannot be done inside render() with such APIs. Rather, do
+ such operations either in prepare() or the slot connected to
+ beforeRendering (with DirectConnection).
\sa QSGRendererInterface, QQuickWindow::rendererInterface()
*/