1/****************************************************************************
2**
3** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the Qt3D module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#ifndef QT3DRENDER_QTEXTURE_H
41#define QT3DRENDER_QTEXTURE_H
42
43#include <Qt3DRender/qtextureimagedata.h>
44#include <Qt3DRender/qtexturewrapmode.h>
45#include <Qt3DRender/qtextureimage.h>
46#include <Qt3DRender/qabstracttexture.h>
47
48QT_BEGIN_NAMESPACE
49
50#if 0
51// Create a forwarding header
52#pragma qt_class(QTexture)
53#pragma qt_sync_stop_processing
54#endif
55
56namespace Qt3DRender {
57
58class Q_3DRENDERSHARED_EXPORT QTexture1D : public QAbstractTexture
59{
60 Q_OBJECT
61public:
62 explicit QTexture1D(Qt3DCore::QNode *parent = nullptr);
63 ~QTexture1D();
64};
65
66class Q_3DRENDERSHARED_EXPORT QTexture1DArray : public QAbstractTexture
67{
68 Q_OBJECT
69public:
70 explicit QTexture1DArray(Qt3DCore::QNode *parent = nullptr);
71 ~QTexture1DArray();
72};
73
74class Q_3DRENDERSHARED_EXPORT QTexture2D : public QAbstractTexture
75{
76 Q_OBJECT
77public:
78 explicit QTexture2D(Qt3DCore::QNode *parent = nullptr);
79 ~QTexture2D();
80};
81
82class Q_3DRENDERSHARED_EXPORT QTexture2DArray : public QAbstractTexture
83{
84 Q_OBJECT
85public:
86 explicit QTexture2DArray(Qt3DCore::QNode *parent = nullptr);
87 ~QTexture2DArray();
88};
89
90class Q_3DRENDERSHARED_EXPORT QTexture3D : public QAbstractTexture
91{
92 Q_OBJECT
93public:
94 explicit QTexture3D(Qt3DCore::QNode *parent = nullptr);
95 ~QTexture3D();
96};
97
98class Q_3DRENDERSHARED_EXPORT QTextureCubeMap : public QAbstractTexture
99{
100 Q_OBJECT
101public:
102 explicit QTextureCubeMap(Qt3DCore::QNode *parent = nullptr);
103 ~QTextureCubeMap();
104};
105
106class Q_3DRENDERSHARED_EXPORT QTextureCubeMapArray : public QAbstractTexture
107{
108 Q_OBJECT
109public:
110 explicit QTextureCubeMapArray(Qt3DCore::QNode *parent = nullptr);
111 ~QTextureCubeMapArray();
112};
113
114class Q_3DRENDERSHARED_EXPORT QTexture2DMultisample : public QAbstractTexture
115{
116 Q_OBJECT
117public:
118 explicit QTexture2DMultisample(Qt3DCore::QNode *parent = nullptr);
119 ~QTexture2DMultisample();
120};
121
122class Q_3DRENDERSHARED_EXPORT QTexture2DMultisampleArray : public QAbstractTexture
123{
124 Q_OBJECT
125public:
126 explicit QTexture2DMultisampleArray(Qt3DCore::QNode *parent = nullptr);
127 ~QTexture2DMultisampleArray();
128};
129
130class Q_3DRENDERSHARED_EXPORT QTextureRectangle : public QAbstractTexture
131{
132 Q_OBJECT
133public:
134 explicit QTextureRectangle(Qt3DCore::QNode *parent = nullptr);
135 ~QTextureRectangle();
136};
137
138class Q_3DRENDERSHARED_EXPORT QTextureBuffer : public QAbstractTexture
139{
140 Q_OBJECT
141public:
142 explicit QTextureBuffer(Qt3DCore::QNode *parent = nullptr);
143 ~QTextureBuffer();
144};
145
146class QTextureLoaderPrivate;
147
148class Q_3DRENDERSHARED_EXPORT QTextureLoader : public QAbstractTexture
149{
150 Q_OBJECT
151 Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
152 Q_PROPERTY(bool mirrored READ isMirrored WRITE setMirrored NOTIFY mirroredChanged)
153public:
154 explicit QTextureLoader(Qt3DCore::QNode *parent = nullptr);
155 ~QTextureLoader();
156
157 QUrl source() const;
158 bool isMirrored() const;
159
160public Q_SLOTS:
161 void setSource(const QUrl &source);
162 void setMirrored(bool mirrored);
163
164Q_SIGNALS:
165 void sourceChanged(const QUrl &source);
166 void mirroredChanged(bool mirrored);
167
168private:
169 Q_DECLARE_PRIVATE(QTextureLoader)
170};
171
172class Q_3DRENDERSHARED_EXPORT QSharedGLTexture : public QAbstractTexture
173{
174 Q_OBJECT
175 Q_PROPERTY(int textureId READ textureId WRITE setTextureId NOTIFY textureIdChanged)
176public:
177 explicit QSharedGLTexture(Qt3DCore::QNode *parent = nullptr);
178 ~QSharedGLTexture();
179
180 int textureId() const;
181
182public Q_SLOTS:
183 void setTextureId(int id);
184
185Q_SIGNALS:
186 void textureIdChanged(int textureId);
187};
188
189} // namespace Qt3DRender
190
191QT_END_NAMESPACE
192
193#endif // QT3DRENDER_QTEXTURE_H
194

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