1// Copyright (C) 2008-2012 NVIDIA Corporation.
2// Copyright (C) 2019 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4
5#ifndef QSSG_RENDER_IMAGE_TEXTURE_H
6#define QSSG_RENDER_IMAGE_TEXTURE_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qglobal_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QRhiTexture;
24
25enum class QSSGRenderImageTextureFlagValue
26{
27 HasTransparency = 1 << 0,
28 RGBE8 = 1 << 1
29};
30
31struct QSSGRenderImageTextureFlags : public QFlags<QSSGRenderImageTextureFlagValue>
32{
33 bool hasTransparency() const { return this->operator&(other: QSSGRenderImageTextureFlagValue::HasTransparency); }
34 void setHasTransparency(bool inValue) { setFlag(flag: QSSGRenderImageTextureFlagValue::HasTransparency, on: inValue); }
35
36 bool isRgbe8() const { return this->operator&(other: QSSGRenderImageTextureFlagValue::RGBE8); }
37 void setRgbe8(bool inValue) { setFlag(flag: QSSGRenderImageTextureFlagValue::RGBE8, on: inValue); }
38};
39
40struct QSSGRenderImageTexture
41{
42 QRhiTexture *m_texture = nullptr; // not owned
43 int m_mipmapCount = 0;
44 QSSGRenderImageTextureFlags m_flags;
45};
46
47QT_END_NAMESPACE
48
49#endif
50

source code of qtquick3d/src/runtimerender/qssgrenderimagetexture_p.h