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_QABSTRACTTEXTURE_P_H
5#define QT3DRENDER_QABSTRACTTEXTURE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <Qt3DRender/qt3drender_global.h>
19#include <Qt3DCore/private/qnode_p.h>
20#include <Qt3DRender/qabstracttexture.h>
21#include <Qt3DRender/qtexturewrapmode.h>
22#include <Qt3DRender/qtexturedataupdate.h>
23#include <Qt3DRender/private/qtexturegenerator_p.h>
24#include <Qt3DRender/private/qt3drender_global_p.h>
25
26QT_BEGIN_NAMESPACE
27
28namespace Qt3DRender {
29
30class Q_3DRENDERSHARED_PRIVATE_EXPORT QAbstractTexturePrivate : public Qt3DCore::QNodePrivate
31{
32public :
33 QAbstractTexturePrivate();
34
35 Q_DECLARE_PUBLIC(QAbstractTexture)
36
37 QAbstractTexture::Target m_target;
38 QAbstractTexture::TextureFormat m_format;
39 int m_width, m_height, m_depth;
40 bool m_autoMipMap;
41
42 QList<QTextureImageDataPtr> m_data;
43
44 QAbstractTexture::Filter m_minFilter, m_magFilter;
45 // FIXME, store per direction
46 QTextureWrapMode m_wrapMode;
47 QAbstractTexture::Status m_status;
48 float m_maximumAnisotropy;
49 QAbstractTexture::ComparisonFunction m_comparisonFunction;
50 QAbstractTexture::ComparisonMode m_comparisonMode;
51 QList<QAbstractTextureImage *> m_textureImages;
52 int m_layers;
53 int m_samples;
54 int m_mipmapLevels;
55
56 int m_sharedTextureId;
57
58 QAbstractTexture::HandleType m_handleType;
59 QVariant m_handle;
60
61 QTextureGeneratorPtr dataFunctor() const;
62 void setDataFunctor(const QTextureGeneratorPtr &generator);
63
64 void setStatus(QAbstractTexture::Status status);
65 void setHandle(const QVariant &handle);
66 void setHandleType(QAbstractTexture::HandleType type);
67
68 QList<QTextureDataUpdate> m_pendingDataUpdates;
69
70private:
71 QTextureGeneratorPtr m_dataFunctor;
72};
73
74} // QT3D
75
76QT_END_NAMESPACE
77
78#endif // QT3DRENDER_QABSTRACTTEXTURE_P_H
79
80

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