aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2022-08-04 12:35:29 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2022-08-04 19:10:09 +0200
commita3f0ae13a7e9530d150830c371829912bbf285d6 (patch)
tree4c9a9273a5222efd070ceac45bb15ae447ff9cb0
parent59ccd01b7e879ba370954f2f7883442e755ada5f (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. Pick-to: 6.4 6.3 6.2 Change-Id: I9e6fba6df38569917da3b3d318f9eb1894cceb9a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-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 661a3772fa..d8fdd5c588 100644
--- a/src/quick/scenegraph/coreapi/qsgrendernode.cpp
+++ b/src/quick/scenegraph/coreapi/qsgrendernode.cpp
@@ -203,13 +203,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()
*/