1// Copyright (C) 2016 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_QTEXTUREDATA_H
5#define QT3DRENDER_QTEXTUREDATA_H
6
7#include <Qt3DRender/qt3drender_global.h>
8#include <Qt3DRender/qabstracttexture.h>
9#include <Qt3DRender/qtextureimagedata.h>
10#include <Qt3DRender/qtexturewrapmode.h>
11
12QT_BEGIN_NAMESPACE
13
14namespace Qt3DRender {
15
16class QTextureDataPrivate;
17
18class Q_3DRENDERSHARED_EXPORT QTextureData
19{
20public:
21 QTextureData();
22 ~QTextureData();
23
24 QAbstractTexture::Target target() const;
25 void setTarget(QAbstractTexture::Target target);
26
27 QAbstractTexture::TextureFormat format() const;
28 void setFormat(QAbstractTexture::TextureFormat);
29
30 int width() const;
31 void setWidth(int width);
32
33 int height() const;
34 void setHeight(int height);
35
36 int depth() const;
37 void setDepth(int depth);
38
39 int layers() const;
40 void setLayers(int layers);
41
42 bool isAutoMipMapGenerationEnabled() const;
43 void setAutoMipMapGenerationEnabled(bool isAutoMipMapGenerationEnabled);
44
45 float maximumAnisotropy() const;
46 void setMaximumAnisotropy(float maximumAnisotropy);
47
48 QAbstractTexture::Filter minificationFilter() const;
49 void setMinificationFilter(QAbstractTexture::Filter filter);
50
51 QAbstractTexture::Filter magnificationFilter() const;
52 void setMagnificationFilter(QAbstractTexture::Filter filter);
53
54 QTextureWrapMode::WrapMode wrapModeX() const;
55 void setWrapModeX(QTextureWrapMode::WrapMode wrapModeX);
56
57 QTextureWrapMode::WrapMode wrapModeY() const;
58 void setWrapModeY(QTextureWrapMode::WrapMode wrapModeY);
59
60 QTextureWrapMode::WrapMode wrapModeZ() const;
61 void setWrapModeZ(QTextureWrapMode::WrapMode wrapModeZ);
62
63 QAbstractTexture::ComparisonFunction comparisonFunction() const;
64 void setComparisonFunction(QAbstractTexture::ComparisonFunction comparisonFunction);
65
66 QAbstractTexture::ComparisonMode comparisonMode() const;
67 void setComparisonMode(QAbstractTexture::ComparisonMode comparisonMode);
68
69 QList<QTextureImageDataPtr> imageData() const;
70 void addImageData(const QTextureImageDataPtr &imageData);
71
72private:
73 Q_DECLARE_PRIVATE(QTextureData)
74 QTextureDataPrivate *d_ptr;
75};
76
77typedef QSharedPointer<QTextureData> QTextureDataPtr;
78
79} // Qt3DRender
80
81QT_END_NAMESPACE
82
83#endif // QT3DRENDER_QTEXTUREDATA_H
84

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