QQuick3DTextureProviderExtension Class
사용자 측 텍스처 프로바이더 확장을 구현하기 위한 추상 클래스. 더 보기...
| Header: | #include <QQuick3DTextureProviderExtension> |
| Since: | Qt 6.11 |
| In QML: | TextureProviderExtension |
| Inherits: | QQuick3DRenderExtension |
공개 유형
| enum class | SamplerHint { Sampler2D, Sampler2DArray, Sampler3D, SamplerCube, SamplerCubeArray, SamplerBuffer } |
속성
(since 6.11)samplerHint : SamplerHint
공개 함수
| QQuick3DTextureProviderExtension::SamplerHint | samplerHint() const |
| void | setSamplerHint(QQuick3DTextureProviderExtension::SamplerHint newSamplerHint) |
신호
| void | samplerHintChanged() |
(since 6.12) void | surfaceChanged() |
재구현된 보호된 함수
| virtual QSSGRenderGraphObject * | updateSpatialNode(QSSGRenderGraphObject *node) override |
상세 설명
이것은 텍스처 프로바이더 확장 기능의 프론트엔드 측입니다. 백엔드 측은 QSSGRenderExtension 에서 구현되어 있습니다. QQuick3DTextureProviderExtension은 QQuick3DRenderExtension 클래스의 특화형으로, 제공될 텍스처의 유형에 대한 추가 메타데이터를 제공할 뿐만 아니라 QtQuick3D 장면 그래프에 확장 기능을 자동으로 등록할 수 있는 사용자 정의 텍스처 프로바이더 확장 기능을 만드는 데 사용됩니다. 즉, View3D 와 함께 사용할 확장 기능 목록에 수동으로 확장 기능을 추가할 필요가 없으며, Texture 컴포넌트의 textureProvider 속성을 사용하는 것만으로도 필요할 때 확장 코드가 실행되도록 할 수 있습니다.
QQuick3DTextureProviderExtension 클래스는 하위 클래스를 생성하여 QML에 노출해야 하는 추상 클래스입니다. 하위 클래스는 QQuick3DRenderExtension::updateSpatialNode() 함수를 구현하고, 실행해야 할 코드가 포함된 QSSGRenderExtension 인스턴스를 반환해야 합니다.
QSSGRenderExtension도 참조하십시오 .
멤버 유형 문서
enum class QQuick3DTextureProviderExtension::SamplerHint
확장 기능이 제공할 텍스처의 유형에 대한 힌트를 지정합니다.
| 상수 | 값 | 설명 |
|---|---|---|
QQuick3DTextureProviderExtension::SamplerHint::Sampler2D | 0 | 2D 텍스처 |
QQuick3DTextureProviderExtension::SamplerHint::Sampler2DArray | 1 | 배열 텍스처 |
QQuick3DTextureProviderExtension::SamplerHint::Sampler3D | 2 | 3D 텍스처 |
QQuick3DTextureProviderExtension::SamplerHint::SamplerCube | 3 | 큐브 맵 텍스처 |
QQuick3DTextureProviderExtension::SamplerHint::SamplerCubeArray | 4 | 큐브 맵 텍스처의 배열 |
QQuick3DTextureProviderExtension::SamplerHint::SamplerBuffer | 5 | 버퍼 텍스처 |
속성 설명서
[since 6.11] samplerHint : SamplerHint
이 속성에는 확장 기능이 제공할 텍스처 유형에 대한 힌트가 포함되어 있습니다. 텍스처 데이터는 필요한 시점이 될 때까지 제공되지 않지만, Texture 컴포넌트를 사용하는 머티리얼은 어떤 유형의 샘플러를 제공해야 하는지 알아야 하기 때문에 이 속성이 필요합니다.
기본값은 QQuick3DTextureProviderExtension::Sampler2D 입니다.
참고: 이 속성은 CustomMaterials를 사용할 때만 사용됩니다.
이 열거형은 Qt 6.11에서 도입되었습니다.
액세스 함수:
| QQuick3DTextureProviderExtension::SamplerHint | samplerHint() const |
| void | setSamplerHint(QQuick3DTextureProviderExtension::SamplerHint newSamplerHint) |
Notifier 신호:
| void | samplerHintChanged() |
참조: SamplerHint.
멤버 함수 문서
[signal, since 6.12] void QQuick3DTextureProviderExtension::surfaceChanged()
이 신호는 기본 렌더링 표면이 변경되어 텍스처를 다시 생성해야 할 때 발생합니다.
이 함수는 Qt 6.12에서 도입되었습니다.
[override virtual protected] QSSGRenderGraphObject *QQuick3DTextureProviderExtension::updateSpatialNode(QSSGRenderGraphObject *node)
QQuick3DRenderExtension::updateSpatialNode(QSSGRenderGraphObject *node)를 재구현합니다.
이 함수는 QtQuick3D 장면 그래프의 동기화 과정에서, 항목이 생성되거나 (일반적으로 항목 속성의 변경으로 인해) 업데이트가 요청될 때 호출됩니다. 이 함수는 QtQuick3D 의 렌더링 파이프라인 실행 중에 실행되어야 할 코드를 포함하는 QSSGRenderTextureProviderExtension 인스턴스를 반환해야 합니다.
node 매개변수는 이 함수에서 이전에 반환된 QSSGRenderTextureProviderExtension 인스턴스이거나, 함수가 처음 호출된 경우 null입니다. 이 함수는 동일한 인스턴스, 다른 인스턴스 또는 null을 반환할 수 있습니다. 함수가 null을 반환하면 해당 확장 기능은 렌더링 파이프라인에서 제거됩니다.
참고: ` QSSGRenderTextureProviderExtension `인스턴스는 리소스 객체이며, ` QtQuick3D ` 씬 그래프가 이를 소유하게 됩니다. 다른 인스턴스나 `null`이 반환되면, 이전 인스턴스는 렌더러에 의해 삭제 대기열에 추가됩니다.
QSSGRenderTextureProviderExtension도 참조하십시오 .
© 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.