
This can be expensive on some systems due to the cost of texturing and blending. Going through QQuickFramebufferObject allows creating a custom item similarly to what this example does, but it does it by rendering the custom content in a texture, and then drawing a textured quad with that texture. The custom item behaves like any other Qt Quick item, meaning it participates and stacking and clipping as usual, which is a big difference to the alternative approaches like having the custom rendering as an overlay (connecting to QQuickWindow::afterRendering()) and underlay (connecting to QQuickWindow::beforeRendering()) because those do not offer the possibility of proper mixing of the custom content with the Qt Quick scene.Īnother important feature is that QSGRenderNode can be helpful to preserve performance, when compared to some of the alternatives.
Quick node sample getopenidtokenfordeveloperidentity full#
The example has full support for OpenGL and Metal, as well as the software backend of Qt Quick. The rest of the scene (background, text, rectangles) are standard Qt Quick items. This example demonstrates implementing a custom QQuickItem backed by a QSGRenderNode implementation, where the node renders a triangle directly via the graphics API. QSGRenderNode allows integrating draw and other calls made directly via the Qt Quick scene graph's underlying native graphics API (such as, Vulkan, Metal, Direct 3D, or OpenGL).
