QQuick3DTextureProviderExtension Class
Abstract class for implementing user side texture provider extensions. More...
Header: | #include <QQuick3DTextureProviderExtension> |
Since: | Qt 6.11 |
In QML: | TextureProviderExtension |
Inherits: | QQuick3DRenderExtension |
Public Functions
QQuick3DTextureProviderExtension::SamplerHint | samplerHint() const |
void | setSamplerHint(QQuick3DTextureProviderExtension::SamplerHint newSamplerHint) |
Signals
void | samplerHintChanged() |
Reimplemented Protected Functions
virtual QSSGRenderGraphObject * | updateSpatialNode(QSSGRenderGraphObject *node) override |
Detailed Description
This is the front-end side of a texture provider extension. The back-end side is implemented in QSSGRenderExtension. The QQuick3DTextureProviderExtension is a specialization of the QQuick3DRenderExtension class that is used to create a custom texture provider extension that can both provide additional metadata about what type of texture will be provided and also automatically register the extension with the QtQuick3D scene graph. This means it is unecessary to manually add the extension to the list of extensions to be used with a View3D, and just using the textureProvider property of the Texture component is enough to trigger the extension code to be run when necessary.
The QQuick3DTextureProviderExtension 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 protected]
QSSGRenderGraphObject *QQuick3DTextureProviderExtension::updateSpatialNode(QSSGRenderGraphObject *node)
Reimplements: 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 QSSGRenderTextureProviderExtension instance that contains the code that should be run during QtQuick3D's rendering pipeline execution.
The node parameter is the previous QSSGRenderTextureProviderExtension instance that was returned from this function, or null if this is the first time the function is called. The function can return the same instance, a different instance, or null. If the function returns null, the extension will be removed from the rendering pipeline.
Note: The QSSGRenderTextureProviderExtension 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 QSSGRenderTextureProviderExtension.
© 2025 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.