aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2019-08-16 14:21:15 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-08-22 16:10:24 +0200
commit7dcdf3b7ae27cd26b84731941f5b1f380c5b3316 (patch)
tree90f5641dc9d4951c7318328d0a205a30a500f775 /src/quick/items
parentef2715251e1785e273873e4000ed08fd99962ab7 (diff)
rendernode example: Add support for Metal
Plus clarify QQuickWindow::begin/endExternalCommands() in combination with QSGRenderNode in the docs. As the example demonstrates, calling these functions is not necessary within render() of a render node. Also fix an issue with resetting the scissor in the renderer after calling render() of a QSGRenderNode. Change-Id: If8c2dab38d62aa444266d37901f062a51e767f68 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquickwindow.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 88a731b229..8b5e2a012a 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -4666,6 +4666,11 @@ const QQuickWindow::GraphicsStateInfo *QQuickWindow::graphicsStateInfo()
beginExternalCommands() and endExternalCommands() together provide a
replacement for resetOpenGLState().
+ Calling this function and endExternalCommands() is not necessary within the
+ \l{QSGRenderNode::render()}{render()} implementation of a QSGRenderNode
+ because the scene graph performs the necessary steps implicitly for render
+ nodes.
+
\note This function has no effect when the scene graph is using OpenGL
directly and the RHI graphics abstraction layer is not in use. Refer to
resetOpenGLState() in that case.
@@ -4704,6 +4709,11 @@ void QQuickWindow::beginExternalCommands()
beginExternalCommands() and endExternalCommands() together provide a
replacement for resetOpenGLState().
+ Calling this function and beginExternalCommands() is not necessary within the
+ \l{QSGRenderNode::render()}{render()} implementation of a QSGRenderNode
+ because the scene graph performs the necessary steps implicitly for render
+ nodes.
+
\note This function has no effect when the scene graph is using OpenGL
directly and the RHI graphics abstraction layer is not in use. Refer to
resetOpenGLState() in that case.