aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2019-08-28 15:18:44 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-09-08 09:41:27 +0200
commitee702d94368140618fc4777a0e247219a28d39c8 (patch)
treee48c9b7cceec01c67add7fcf51a011497fd3b7ea /src/quick/items
parent76bec768a5bf9ff29fdc439cbe5a85d36590a6df (diff)
Make vulkanunderqml work and update docs
What we are doing for now is setting ExternalContentsInPass always. This way vulkanunderqml works as expected. For applications that do not integrate external rendering this means that there is now an additional secondary command buffer per render pass, but we can live with this for now. Later (Qt 6) there should be a way to declare this (that the application will want to issue native rendering stuff) up front in QQuickWindow or somewhere. Change-Id: I736741f9b0eee2f8295b046bacdce862e6a546f5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquickwindow.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 27e2a4572e..4e65c60b85 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -4773,6 +4773,17 @@ const QQuickWindow::GraphicsStateInfo *QQuickWindow::graphicsStateInfo()
because the scene graph performs the necessary steps implicitly for render
nodes.
+ Native graphics objects (such as, graphics device, command buffer or
+ encoder) are accessible via QSGRendererInterface::getResource().
+
+ \warning Watch out for the fact that
+ QSGRendererInterface::CommandListResource may return a different object
+ between beginExternalCommands() - endExternalCommands(). This can happen
+ when the underlying implementation provides a dedicated secondary command
+ buffer for recording external graphics commands within a render pass.
+ Therefore, always query CommandListResource after calling this function. Do
+ not attempt to reuse an object from an earlier query.
+
\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.