Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquick3dtextureproviderextension.h
Go to the documentation of this file.
1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QQUICK3DTEXTUREPROVIDEREXTENSION_H
5#define QQUICK3DTEXTUREPROVIDEREXTENSION_H
6
7#include <QtQuick3D/QQuick3DRenderExtension>
8#include <QtQml/QQmlEngine>
9
10QT_BEGIN_NAMESPACE
11
12class QQuick3DTextureProviderExtensionPrivate;
13
14class Q_QUICK3D_EXPORT QQuick3DTextureProviderExtension : public QQuick3DRenderExtension
15{
16 Q_OBJECT
17 Q_DECLARE_PRIVATE(QQuick3DTextureProviderExtension)
18
19 Q_PROPERTY(SamplerHint samplerHint READ samplerHint WRITE setSamplerHint NOTIFY samplerHintChanged FINAL)
20 QML_NAMED_ELEMENT(TextureProviderExtension)
21 QML_UNCREATABLE("TextureProviderExtension is an abstract type")
22 QML_ADDED_IN_VERSION(6, 11)
23public:
24 // Sampler Types
25 enum class SamplerHint {
26 Sampler2D,
27 Sampler2DArray,
28 Sampler3D,
29 SamplerCube,
30 SamplerCubeArray,
31 SamplerBuffer,
32 };
33 Q_ENUM(SamplerHint)
34
35 explicit QQuick3DTextureProviderExtension(QQuick3DObject *parent = nullptr);
36 ~QQuick3DTextureProviderExtension() override;
37
38 SamplerHint samplerHint() const;
39 void setSamplerHint(SamplerHint newSamplerHint);
40
41Q_SIGNALS:
42 void samplerHintChanged();
43
44protected:
45 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override;
46};
47
48QT_END_NAMESPACE
49
50#endif // QQUICK3DTEXTUREPROVIDEREXTENSION_H