1 | // Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QT3DRENDER_QTEXTURE_H |
5 | #define QT3DRENDER_QTEXTURE_H |
6 | |
7 | #include <Qt3DRender/qtextureimagedata.h> |
8 | #include <Qt3DRender/qtexturewrapmode.h> |
9 | #include <Qt3DRender/qtextureimage.h> |
10 | #include <Qt3DRender/qabstracttexture.h> |
11 | |
12 | QT_BEGIN_NAMESPACE |
13 | |
14 | #if 0 |
15 | // Create a forwarding header |
16 | #pragma qt_class(QTexture) |
17 | #pragma qt_sync_stop_processing |
18 | #endif |
19 | |
20 | namespace Qt3DRender { |
21 | |
22 | class Q_3DRENDERSHARED_EXPORT QTexture1D : public QAbstractTexture |
23 | { |
24 | Q_OBJECT |
25 | public: |
26 | explicit QTexture1D(Qt3DCore::QNode *parent = nullptr); |
27 | ~QTexture1D(); |
28 | }; |
29 | |
30 | class Q_3DRENDERSHARED_EXPORT QTexture1DArray : public QAbstractTexture |
31 | { |
32 | Q_OBJECT |
33 | public: |
34 | explicit QTexture1DArray(Qt3DCore::QNode *parent = nullptr); |
35 | ~QTexture1DArray(); |
36 | }; |
37 | |
38 | class Q_3DRENDERSHARED_EXPORT QTexture2D : public QAbstractTexture |
39 | { |
40 | Q_OBJECT |
41 | public: |
42 | explicit QTexture2D(Qt3DCore::QNode *parent = nullptr); |
43 | ~QTexture2D(); |
44 | }; |
45 | |
46 | class Q_3DRENDERSHARED_EXPORT QTexture2DArray : public QAbstractTexture |
47 | { |
48 | Q_OBJECT |
49 | public: |
50 | explicit QTexture2DArray(Qt3DCore::QNode *parent = nullptr); |
51 | ~QTexture2DArray(); |
52 | }; |
53 | |
54 | class Q_3DRENDERSHARED_EXPORT QTexture3D : public QAbstractTexture |
55 | { |
56 | Q_OBJECT |
57 | public: |
58 | explicit QTexture3D(Qt3DCore::QNode *parent = nullptr); |
59 | ~QTexture3D(); |
60 | }; |
61 | |
62 | class Q_3DRENDERSHARED_EXPORT QTextureCubeMap : public QAbstractTexture |
63 | { |
64 | Q_OBJECT |
65 | public: |
66 | explicit QTextureCubeMap(Qt3DCore::QNode *parent = nullptr); |
67 | ~QTextureCubeMap(); |
68 | }; |
69 | |
70 | class Q_3DRENDERSHARED_EXPORT QTextureCubeMapArray : public QAbstractTexture |
71 | { |
72 | Q_OBJECT |
73 | public: |
74 | explicit QTextureCubeMapArray(Qt3DCore::QNode *parent = nullptr); |
75 | ~QTextureCubeMapArray(); |
76 | }; |
77 | |
78 | class Q_3DRENDERSHARED_EXPORT QTexture2DMultisample : public QAbstractTexture |
79 | { |
80 | Q_OBJECT |
81 | public: |
82 | explicit QTexture2DMultisample(Qt3DCore::QNode *parent = nullptr); |
83 | ~QTexture2DMultisample(); |
84 | }; |
85 | |
86 | class Q_3DRENDERSHARED_EXPORT QTexture2DMultisampleArray : public QAbstractTexture |
87 | { |
88 | Q_OBJECT |
89 | public: |
90 | explicit QTexture2DMultisampleArray(Qt3DCore::QNode *parent = nullptr); |
91 | ~QTexture2DMultisampleArray(); |
92 | }; |
93 | |
94 | class Q_3DRENDERSHARED_EXPORT QTextureRectangle : public QAbstractTexture |
95 | { |
96 | Q_OBJECT |
97 | public: |
98 | explicit QTextureRectangle(Qt3DCore::QNode *parent = nullptr); |
99 | ~QTextureRectangle(); |
100 | }; |
101 | |
102 | class Q_3DRENDERSHARED_EXPORT QTextureBuffer : public QAbstractTexture |
103 | { |
104 | Q_OBJECT |
105 | public: |
106 | explicit QTextureBuffer(Qt3DCore::QNode *parent = nullptr); |
107 | ~QTextureBuffer(); |
108 | }; |
109 | |
110 | class QTextureLoaderPrivate; |
111 | |
112 | class Q_3DRENDERSHARED_EXPORT QTextureLoader : public QAbstractTexture |
113 | { |
114 | Q_OBJECT |
115 | Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) |
116 | Q_PROPERTY(bool mirrored READ isMirrored WRITE setMirrored NOTIFY mirroredChanged) |
117 | public: |
118 | explicit QTextureLoader(Qt3DCore::QNode *parent = nullptr); |
119 | ~QTextureLoader(); |
120 | |
121 | QUrl source() const; |
122 | bool isMirrored() const; |
123 | |
124 | public Q_SLOTS: |
125 | void setSource(const QUrl &source); |
126 | void setMirrored(bool mirrored); |
127 | |
128 | Q_SIGNALS: |
129 | void sourceChanged(const QUrl &source); |
130 | void mirroredChanged(bool mirrored); |
131 | |
132 | private: |
133 | Q_DECLARE_PRIVATE(QTextureLoader) |
134 | }; |
135 | |
136 | class Q_3DRENDERSHARED_EXPORT QSharedGLTexture : public QAbstractTexture |
137 | { |
138 | Q_OBJECT |
139 | Q_PROPERTY(int textureId READ textureId WRITE setTextureId NOTIFY textureIdChanged) |
140 | public: |
141 | explicit QSharedGLTexture(Qt3DCore::QNode *parent = nullptr); |
142 | ~QSharedGLTexture(); |
143 | |
144 | int textureId() const; |
145 | |
146 | public Q_SLOTS: |
147 | void setTextureId(int id); |
148 | |
149 | Q_SIGNALS: |
150 | void textureIdChanged(int textureId); |
151 | }; |
152 | |
153 | } // namespace Qt3DRender |
154 | |
155 | QT_END_NAMESPACE |
156 | |
157 | #endif // QT3DRENDER_QTEXTURE_H |
158 |