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
12QT_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
20namespace Qt3DRender {
21
22class Q_3DRENDERSHARED_EXPORT QTexture1D : public QAbstractTexture
23{
24 Q_OBJECT
25public:
26 explicit QTexture1D(Qt3DCore::QNode *parent = nullptr);
27 ~QTexture1D();
28};
29
30class Q_3DRENDERSHARED_EXPORT QTexture1DArray : public QAbstractTexture
31{
32 Q_OBJECT
33public:
34 explicit QTexture1DArray(Qt3DCore::QNode *parent = nullptr);
35 ~QTexture1DArray();
36};
37
38class Q_3DRENDERSHARED_EXPORT QTexture2D : public QAbstractTexture
39{
40 Q_OBJECT
41public:
42 explicit QTexture2D(Qt3DCore::QNode *parent = nullptr);
43 ~QTexture2D();
44};
45
46class Q_3DRENDERSHARED_EXPORT QTexture2DArray : public QAbstractTexture
47{
48 Q_OBJECT
49public:
50 explicit QTexture2DArray(Qt3DCore::QNode *parent = nullptr);
51 ~QTexture2DArray();
52};
53
54class Q_3DRENDERSHARED_EXPORT QTexture3D : public QAbstractTexture
55{
56 Q_OBJECT
57public:
58 explicit QTexture3D(Qt3DCore::QNode *parent = nullptr);
59 ~QTexture3D();
60};
61
62class Q_3DRENDERSHARED_EXPORT QTextureCubeMap : public QAbstractTexture
63{
64 Q_OBJECT
65public:
66 explicit QTextureCubeMap(Qt3DCore::QNode *parent = nullptr);
67 ~QTextureCubeMap();
68};
69
70class Q_3DRENDERSHARED_EXPORT QTextureCubeMapArray : public QAbstractTexture
71{
72 Q_OBJECT
73public:
74 explicit QTextureCubeMapArray(Qt3DCore::QNode *parent = nullptr);
75 ~QTextureCubeMapArray();
76};
77
78class Q_3DRENDERSHARED_EXPORT QTexture2DMultisample : public QAbstractTexture
79{
80 Q_OBJECT
81public:
82 explicit QTexture2DMultisample(Qt3DCore::QNode *parent = nullptr);
83 ~QTexture2DMultisample();
84};
85
86class Q_3DRENDERSHARED_EXPORT QTexture2DMultisampleArray : public QAbstractTexture
87{
88 Q_OBJECT
89public:
90 explicit QTexture2DMultisampleArray(Qt3DCore::QNode *parent = nullptr);
91 ~QTexture2DMultisampleArray();
92};
93
94class Q_3DRENDERSHARED_EXPORT QTextureRectangle : public QAbstractTexture
95{
96 Q_OBJECT
97public:
98 explicit QTextureRectangle(Qt3DCore::QNode *parent = nullptr);
99 ~QTextureRectangle();
100};
101
102class Q_3DRENDERSHARED_EXPORT QTextureBuffer : public QAbstractTexture
103{
104 Q_OBJECT
105public:
106 explicit QTextureBuffer(Qt3DCore::QNode *parent = nullptr);
107 ~QTextureBuffer();
108};
109
110class QTextureLoaderPrivate;
111
112class 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)
117public:
118 explicit QTextureLoader(Qt3DCore::QNode *parent = nullptr);
119 ~QTextureLoader();
120
121 QUrl source() const;
122 bool isMirrored() const;
123
124public Q_SLOTS:
125 void setSource(const QUrl &source);
126 void setMirrored(bool mirrored);
127
128Q_SIGNALS:
129 void sourceChanged(const QUrl &source);
130 void mirroredChanged(bool mirrored);
131
132private:
133 Q_DECLARE_PRIVATE(QTextureLoader)
134};
135
136class Q_3DRENDERSHARED_EXPORT QSharedGLTexture : public QAbstractTexture
137{
138 Q_OBJECT
139 Q_PROPERTY(int textureId READ textureId WRITE setTextureId NOTIFY textureIdChanged)
140public:
141 explicit QSharedGLTexture(Qt3DCore::QNode *parent = nullptr);
142 ~QSharedGLTexture();
143
144 int textureId() const;
145
146public Q_SLOTS:
147 void setTextureId(int id);
148
149Q_SIGNALS:
150 void textureIdChanged(int textureId);
151};
152
153} // namespace Qt3DRender
154
155QT_END_NAMESPACE
156
157#endif // QT3DRENDER_QTEXTURE_H
158

source code of qt3d/src/render/texture/qtexture.h