本页内容

TextureProviderExtension QML Type (Uncreatable)

用于生成纹理的渲染扩展的抽象基类。更多...

Import Statement: import QtQuick3D
Since: Qt 6.11
In C++: QQuick3DTextureProviderExtension
Inherits:

RenderExtension

Inherited By:

QuadTextureProvider and RenderOutputProvider

注意:此类型不可创建。无法在 QML 中实例化。

枚举

属性

详细说明

TextureProviderExtension 是一个不可创建的抽象基类,用于渲染扩展,可将 GPU 纹理暴露给Qt Quick 3D 场景。子类(例如RenderOutputProvider )可被赋值给Texture 的textureProvider 属性,从而在场景需要该纹理时自动运行该扩展的渲染代码。

另请参阅 RenderOutputProvider 、QQuick3DTextureProviderExtension 和QSSGRenderExtension 。

枚举文档

[since 6.11] SamplerHint

指定有关该扩展所提供纹理类型的提示。

常量描述
TextureProviderExtension.Sampler2D一个二维纹理
TextureProviderExtension.Sampler2DArray数组纹理
TextureProviderExtension.Sampler3D3D 纹理
TextureProviderExtension.SamplerCube立方体贴图
TextureProviderExtension.SamplerCubeArray立方体贴图数组
TextureProviderExtension.SamplerBuffer缓冲区纹理

该枚举类型在 Qt 6.11 中引入。

属性文档

samplerHint : SamplerHint [since 6.11]

该属性包含有关扩展将提供的纹理类型的提示。这是必要的,因为纹理数据只有在需要时才会提供,但使用“纹理”组件的材质需要知道应提供何种类型的采样器。

默认值为TextureProviderExtension.Sampler2D 。

注意: 仅在使用自定义材质(CustomMaterials)时才会用到此 属性。

该属性自 Qt 6.11 起引入。

© 2026 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.