1// Copyright (C) 2015 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_QABSTRACTTEXTUREIMAGE_H
5#define QT3DRENDER_QABSTRACTTEXTUREIMAGE_H
6
7#include <Qt3DRender/qabstracttexture.h>
8#include <Qt3DRender/qtextureimagedatagenerator.h>
9
10QT_BEGIN_NAMESPACE
11
12namespace Qt3DRender {
13
14class QAbstractTextureImagePrivate;
15
16class Q_3DRENDERSHARED_EXPORT QAbstractTextureImage : public Qt3DCore::QNode
17{
18 Q_OBJECT
19 Q_PROPERTY(int mipLevel READ mipLevel WRITE setMipLevel NOTIFY mipLevelChanged)
20 Q_PROPERTY(int layer READ layer WRITE setLayer NOTIFY layerChanged)
21 Q_PROPERTY(Qt3DRender::QAbstractTexture::CubeMapFace face READ face WRITE setFace NOTIFY faceChanged)
22public:
23 explicit QAbstractTextureImage(Qt3DCore::QNode *parent = nullptr);
24 virtual ~QAbstractTextureImage();
25
26 int mipLevel() const;
27 int layer() const;
28 QAbstractTexture::CubeMapFace face() const;
29
30public Q_SLOTS:
31 void setMipLevel(int level);
32 void setLayer(int layer);
33 void setFace(QAbstractTexture::CubeMapFace face);
34
35Q_SIGNALS:
36 void mipLevelChanged(int mipLevel);
37 void layerChanged(int layer);
38 void faceChanged(QAbstractTexture::CubeMapFace face);
39
40protected:
41 void notifyDataGeneratorChanged();
42 virtual QTextureImageDataGeneratorPtr dataGenerator() const = 0;
43 explicit QAbstractTextureImage(QAbstractTextureImagePrivate &dd, Qt3DCore::QNode *parent = nullptr);
44
45private:
46 Q_DECLARE_PRIVATE(QAbstractTextureImage)
47};
48
49} // namespace Qt3DRender
50
51QT_END_NAMESPACE
52
53#endif // QT3DRENDER_QABSTRACTTEXTUREIMAGE_H
54

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