QQuick3DRenderExtension Class

Abstract class for implementing user side render extensions. More...

Header: #include <QQuick3DRenderExtension>
Since: Qt 6.7
In QML: RenderExtension
Inherits: QQuick3DObject

Reimplemented Public Functions

virtual QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override

Detailed Description

This is the front-end side of a render extension. The back-end side is implemented in QSSGRenderExtension. The QQuick3DRenderExtension class is used to create a custom render extension that can be used in the QtQuick3D scene graph by adding it to the list of extensions to be used with a View3D. The extension code will then be run as part of QtQuick3D's rendering pipeline execution.

The QQuick3DRenderExtension class is an abstract class that should be subclassed and exposed to QML. The subclass should implement the QQuick3DRenderExtension::updateSpatialNode() function and return a QSSGRenderExtension instance that contains the code that should be run.

See also QSSGRenderExtension.

Member Function Documentation

[override virtual] QSSGRenderGraphObject *QQuick3DRenderExtension::updateSpatialNode(QSSGRenderGraphObject *node)

This function is called during the synchronization of the QtQuick3D scene graph when an item is created or when an update is requested, usually as a result of a change in the item's properties. The function should return a QSSGRenderExtension instance that contains the code that should be run during QtQuick3D's rendering pipeline execution.

Note: The QSSGRenderExtension instance is a resource object and will be owned by the QtQuick3D scene graph. If a different instance, or null, is returned, the previous instance will be queued for deletion by the renderer.

See also QSSGRenderExtension.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.