Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qsgcompressedtexture_p.h
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QSGCOMPRESSEDTEXTURE_P_H
6
#
define
QSGCOMPRESSEDTEXTURE_P_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
/
qtexturefiledata_p
.
h
>
20
#
include
<
private
/
qsgcontext_p
.
h
>
21
#
include
<
private
/
qsgtexture_p
.
h
>
22
#
include
<
rhi
/
qrhi
.
h
>
23
#
include
<
QQuickTextureFactory
>
24
#
include
<
QOpenGLFunctions
>
25
26
QT_BEGIN_NAMESPACE
27
28
Q_DECLARE_LOGGING_CATEGORY(QSG_LOG_TEXTUREIO);
29
30
class
Q_QUICK_EXPORT
QSGCompressedTexture
:
public
QSGTexture
31
{
32
Q_OBJECT
33
public
:
34
QSGCompressedTexture(
const
QTextureFileData& texData);
35
virtual
~QSGCompressedTexture();
36
37
QSize textureSize()
const
override;
38
bool
hasAlphaChannel()
const
override;
39
bool
hasMipmaps()
const
override;
40
41
qint64 comparisonKey()
const
override;
42
QRhiTexture *rhiTexture()
const
override;
43
void
commitTextureOperations(QRhi *rhi, QRhiResourceUpdateBatch *resourceUpdates) override;
44
45
QTextureFileData textureData()
const
;
46
47
struct
FormatInfo
48
{
49
QRhiTexture::Format rhiFormat;
50
bool
isSRGB;
51
};
52
static
FormatInfo formatInfo(quint32 glTextureFormat);
53
static
bool
formatIsOpaque(quint32 glTextureFormat);
54
55
protected
:
56
QTextureFileData m_textureData;
57
QSize m_size;
58
QRhiTexture *m_texture =
nullptr
;
59
bool
m_hasAlpha =
false
;
60
bool
m_uploaded =
false
;
61
};
62
63
namespace
QSGOpenGLAtlasTexture
{
64
class
Manager;
65
}
66
67
class
Q_QUICK_EXPORT
QSGCompressedTextureFactory
:
public
QQuickTextureFactory
68
{
69
public
:
70
QSGCompressedTextureFactory(
const
QTextureFileData& texData);
71
QSGTexture *createTexture(QQuickWindow *)
const
override;
72
int
textureByteCount()
const
override;
73
QSize textureSize()
const
override;
74
75
const
QTextureFileData *textureData()
const
{
return
&m_textureData; }
76
77
protected
:
78
QTextureFileData m_textureData;
79
};
80
81
QT_END_NAMESPACE
82
83
#
endif
// QSGCOMPRESSEDTEXTURE_P_H
QSGCompressedTextureFactory
Definition
qsgcompressedtexture_p.h:68
QSGCompressedTexture
Definition
qsgcompressedtexture_p.h:31
QInternalGLTextureFormat
Definition
qsgcompressedtexture.cpp:53
QInternalGLTextureFormat::RG11_EAC_SNorm
@ RG11_EAC_SNorm
Definition
qsgcompressedtexture.cpp:157
QInternalGLTextureFormat::RG_ATI2N_SNorm
@ RG_ATI2N_SNorm
Definition
qsgcompressedtexture.cpp:150
QInternalGLTextureFormat::R8_SNorm
@ R8_SNorm
Definition
qsgcompressedtexture.cpp:71
QInternalGLTextureFormat::SRGB8_PunchThrough_Alpha1_ETC2
@ SRGB8_PunchThrough_Alpha1_ETC2
Definition
qsgcompressedtexture.cpp:161
QInternalGLTextureFormat::SRGB8_Alpha8_ETC2_EAC
@ SRGB8_Alpha8_ETC2_EAC
Definition
qsgcompressedtexture.cpp:163
QInternalGLTextureFormat::R_ATI1N_SNorm
@ R_ATI1N_SNorm
Definition
qsgcompressedtexture.cpp:148
QInternalGLTextureFormat::RGB16I
@ RGB16I
Definition
qsgcompressedtexture.cpp:105
QInternalGLTextureFormat::RGBA_ASTC_10x6
@ RGBA_ASTC_10x6
Definition
qsgcompressedtexture.cpp:174
QInternalGLTextureFormat::NoFormat
@ NoFormat
Definition
qsgcompressedtexture.cpp:57
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_12x10
@ SRGB8_Alpha8_ASTC_12x10
Definition
qsgcompressedtexture.cpp:191
QInternalGLTextureFormat::RGBA_DXT3
@ RGBA_DXT3
Definition
qsgcompressedtexture.cpp:145
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_8x8
@ SRGB8_Alpha8_ASTC_8x8
Definition
qsgcompressedtexture.cpp:186
QInternalGLTextureFormat::S8
@ S8
Definition
qsgcompressedtexture.cpp:140
QInternalGLTextureFormat::RGBA16_SNorm
@ RGBA16_SNorm
Definition
qsgcompressedtexture.cpp:79
QInternalGLTextureFormat::RGB32U
@ RGB32U
Definition
qsgcompressedtexture.cpp:94
QInternalGLTextureFormat::SRGB_BP_UNorm
@ SRGB_BP_UNorm
Definition
qsgcompressedtexture.cpp:201
QInternalGLTextureFormat::RGBA_ASTC_8x5
@ RGBA_ASTC_8x5
Definition
qsgcompressedtexture.cpp:170
QInternalGLTextureFormat::D24S8
@ D24S8
Definition
qsgcompressedtexture.cpp:136
QInternalGLTextureFormat::RGBA8I
@ RGBA8I
Definition
qsgcompressedtexture.cpp:101
QInternalGLTextureFormat::RGBA_ASTC_6x6
@ RGBA_ASTC_6x6
Definition
qsgcompressedtexture.cpp:169
QInternalGLTextureFormat::RGBA8_UNorm
@ RGBA8_UNorm
Definition
qsgcompressedtexture.cpp:63
QInternalGLTextureFormat::RGBA16U
@ RGBA16U
Definition
qsgcompressedtexture.cpp:90
QInternalGLTextureFormat::RGB32F
@ RGB32F
Definition
qsgcompressedtexture.cpp:121
QInternalGLTextureFormat::RG_ATI2N_UNorm
@ RG_ATI2N_UNorm
Definition
qsgcompressedtexture.cpp:149
QInternalGLTextureFormat::RGB16_SNorm
@ RGB16_SNorm
Definition
qsgcompressedtexture.cpp:78
QInternalGLTextureFormat::RGBA32I
@ RGBA32I
Definition
qsgcompressedtexture.cpp:111
QInternalGLTextureFormat::RGBA8_ETC2_EAC
@ RGBA8_ETC2_EAC
Definition
qsgcompressedtexture.cpp:162
QInternalGLTextureFormat::RGBA4
@ RGBA4
Definition
qsgcompressedtexture.cpp:130
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_5x4
@ SRGB8_Alpha8_ASTC_5x4
Definition
qsgcompressedtexture.cpp:180
QInternalGLTextureFormat::LuminanceFormat
@ LuminanceFormat
Definition
qsgcompressedtexture.cpp:208
QInternalGLTextureFormat::RGBA_DXT5
@ RGBA_DXT5
Definition
qsgcompressedtexture.cpp:146
QInternalGLTextureFormat::R32U
@ R32U
Definition
qsgcompressedtexture.cpp:92
QInternalGLTextureFormat::SRGB_DXT1
@ SRGB_DXT1
Definition
qsgcompressedtexture.cpp:197
QInternalGLTextureFormat::RGBA_ASTC_10x10
@ RGBA_ASTC_10x10
Definition
qsgcompressedtexture.cpp:176
QInternalGLTextureFormat::RGB8U
@ RGB8U
Definition
qsgcompressedtexture.cpp:84
QInternalGLTextureFormat::AlphaFormat
@ AlphaFormat
Definition
qsgcompressedtexture.cpp:205
QInternalGLTextureFormat::R16I
@ R16I
Definition
qsgcompressedtexture.cpp:103
QInternalGLTextureFormat::R32I
@ R32I
Definition
qsgcompressedtexture.cpp:108
QInternalGLTextureFormat::RGBA_ASTC_8x8
@ RGBA_ASTC_8x8
Definition
qsgcompressedtexture.cpp:172
QInternalGLTextureFormat::RGBA_ASTC_5x5
@ RGBA_ASTC_5x5
Definition
qsgcompressedtexture.cpp:167
QInternalGLTextureFormat::RG11_EAC_UNorm
@ RG11_EAC_UNorm
Definition
qsgcompressedtexture.cpp:156
QInternalGLTextureFormat::RGBA_ASTC_12x10
@ RGBA_ASTC_12x10
Definition
qsgcompressedtexture.cpp:177
QInternalGLTextureFormat::RGB_BP_UNorm
@ RGB_BP_UNorm
Definition
qsgcompressedtexture.cpp:153
QInternalGLTextureFormat::RGB_DXT1
@ RGB_DXT1
Definition
qsgcompressedtexture.cpp:143
QInternalGLTextureFormat::D32F
@ D32F
Definition
qsgcompressedtexture.cpp:138
QInternalGLTextureFormat::RG32F
@ RG32F
Definition
qsgcompressedtexture.cpp:120
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_10x10
@ SRGB8_Alpha8_ASTC_10x10
Definition
qsgcompressedtexture.cpp:190
QInternalGLTextureFormat::RGB_BP_UNSIGNED_FLOAT
@ RGB_BP_UNSIGNED_FLOAT
Definition
qsgcompressedtexture.cpp:151
QInternalGLTextureFormat::RGBA_ASTC_10x8
@ RGBA_ASTC_10x8
Definition
qsgcompressedtexture.cpp:175
QInternalGLTextureFormat::LuminanceAlphaFormat
@ LuminanceAlphaFormat
Definition
qsgcompressedtexture.cpp:209
QInternalGLTextureFormat::R_ATI1N_UNorm
@ R_ATI1N_UNorm
Definition
qsgcompressedtexture.cpp:147
QInternalGLTextureFormat::RGBA_ASTC_10x5
@ RGBA_ASTC_10x5
Definition
qsgcompressedtexture.cpp:173
QInternalGLTextureFormat::RG3B2
@ RG3B2
Definition
qsgcompressedtexture.cpp:127
QInternalGLTextureFormat::RGB8_ETC1
@ RGB8_ETC1
Definition
qsgcompressedtexture.cpp:164
QInternalGLTextureFormat::RGB5A1
@ RGB5A1
Definition
qsgcompressedtexture.cpp:129
QInternalGLTextureFormat::RGBA16F
@ RGBA16F
Definition
qsgcompressedtexture.cpp:117
QInternalGLTextureFormat::RG8I
@ RG8I
Definition
qsgcompressedtexture.cpp:99
QInternalGLTextureFormat::D16
@ D16
Definition
qsgcompressedtexture.cpp:134
QInternalGLTextureFormat::RGB8_UNorm
@ RGB8_UNorm
Definition
qsgcompressedtexture.cpp:62
QInternalGLTextureFormat::R5G6B5
@ R5G6B5
Definition
qsgcompressedtexture.cpp:128
QInternalGLTextureFormat::SRGB8
@ SRGB8
Definition
qsgcompressedtexture.cpp:195
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_4x4
@ SRGB8_Alpha8_ASTC_4x4
Definition
qsgcompressedtexture.cpp:179
QInternalGLTextureFormat::RG32I
@ RG32I
Definition
qsgcompressedtexture.cpp:109
QInternalGLTextureFormat::RG8_SNorm
@ RG8_SNorm
Definition
qsgcompressedtexture.cpp:72
QInternalGLTextureFormat::RGB10A2
@ RGB10A2
Definition
qsgcompressedtexture.cpp:131
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_8x6
@ SRGB8_Alpha8_ASTC_8x6
Definition
qsgcompressedtexture.cpp:185
QInternalGLTextureFormat::RGB32I
@ RGB32I
Definition
qsgcompressedtexture.cpp:110
QInternalGLTextureFormat::R8I
@ R8I
Definition
qsgcompressedtexture.cpp:98
QInternalGLTextureFormat::RGB16U
@ RGB16U
Definition
qsgcompressedtexture.cpp:89
QInternalGLTextureFormat::D24
@ D24
Definition
qsgcompressedtexture.cpp:135
QInternalGLTextureFormat::RG16F
@ RG16F
Definition
qsgcompressedtexture.cpp:115
QInternalGLTextureFormat::RGBA16I
@ RGBA16I
Definition
qsgcompressedtexture.cpp:106
QInternalGLTextureFormat::RGBA8_SNorm
@ RGBA8_SNorm
Definition
qsgcompressedtexture.cpp:74
QInternalGLTextureFormat::RGBAFormat
@ RGBAFormat
Definition
qsgcompressedtexture.cpp:207
QInternalGLTextureFormat::RGBA_ASTC_5x4
@ RGBA_ASTC_5x4
Definition
qsgcompressedtexture.cpp:166
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_10x8
@ SRGB8_Alpha8_ASTC_10x8
Definition
qsgcompressedtexture.cpp:189
QInternalGLTextureFormat::R11_EAC_SNorm
@ R11_EAC_SNorm
Definition
qsgcompressedtexture.cpp:155
QInternalGLTextureFormat::RG11B10F
@ RG11B10F
Definition
qsgcompressedtexture.cpp:126
QInternalGLTextureFormat::RG8U
@ RG8U
Definition
qsgcompressedtexture.cpp:83
QInternalGLTextureFormat::RG8_UNorm
@ RG8_UNorm
Definition
qsgcompressedtexture.cpp:61
QInternalGLTextureFormat::RG16U
@ RG16U
Definition
qsgcompressedtexture.cpp:88
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_6x6
@ SRGB8_Alpha8_ASTC_6x6
Definition
qsgcompressedtexture.cpp:183
QInternalGLTextureFormat::RGBA_ASTC_6x5
@ RGBA_ASTC_6x5
Definition
qsgcompressedtexture.cpp:168
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_10x5
@ SRGB8_Alpha8_ASTC_10x5
Definition
qsgcompressedtexture.cpp:187
QInternalGLTextureFormat::RGBA_ASTC_8x6
@ RGBA_ASTC_8x6
Definition
qsgcompressedtexture.cpp:171
QInternalGLTextureFormat::DepthFormat
@ DepthFormat
Definition
qsgcompressedtexture.cpp:204
QInternalGLTextureFormat::R16U
@ R16U
Definition
qsgcompressedtexture.cpp:87
QInternalGLTextureFormat::RG16I
@ RG16I
Definition
qsgcompressedtexture.cpp:104
QInternalGLTextureFormat::RGB9E5
@ RGB9E5
Definition
qsgcompressedtexture.cpp:125
QInternalGLTextureFormat::R16_SNorm
@ R16_SNorm
Definition
qsgcompressedtexture.cpp:76
QInternalGLTextureFormat::RGB8_PunchThrough_Alpha1_ETC2
@ RGB8_PunchThrough_Alpha1_ETC2
Definition
qsgcompressedtexture.cpp:160
QInternalGLTextureFormat::D32FS8X24
@ D32FS8X24
Definition
qsgcompressedtexture.cpp:139
QInternalGLTextureFormat::RGBA_ASTC_12x12
@ RGBA_ASTC_12x12
Definition
qsgcompressedtexture.cpp:178
QInternalGLTextureFormat::SRGB_Alpha_DXT5
@ SRGB_Alpha_DXT5
Definition
qsgcompressedtexture.cpp:200
QInternalGLTextureFormat::R32F
@ R32F
Definition
qsgcompressedtexture.cpp:119
QInternalGLTextureFormat::RG16_SNorm
@ RG16_SNorm
Definition
qsgcompressedtexture.cpp:77
QInternalGLTextureFormat::RGBA8U
@ RGBA8U
Definition
qsgcompressedtexture.cpp:85
QInternalGLTextureFormat::D32
@ D32
Definition
qsgcompressedtexture.cpp:137
QInternalGLTextureFormat::SRGB8_ETC2
@ SRGB8_ETC2
Definition
qsgcompressedtexture.cpp:159
QInternalGLTextureFormat::RGBA32F
@ RGBA32F
Definition
qsgcompressedtexture.cpp:122
QInternalGLTextureFormat::SRGB_Alpha_DXT1
@ SRGB_Alpha_DXT1
Definition
qsgcompressedtexture.cpp:198
QInternalGLTextureFormat::R16_UNorm
@ R16_UNorm
Definition
qsgcompressedtexture.cpp:65
QInternalGLTextureFormat::RGBA_ASTC_4x4
@ RGBA_ASTC_4x4
Definition
qsgcompressedtexture.cpp:165
QInternalGLTextureFormat::RGB8_ETC2
@ RGB8_ETC2
Definition
qsgcompressedtexture.cpp:158
QInternalGLTextureFormat::RGB16_UNorm
@ RGB16_UNorm
Definition
qsgcompressedtexture.cpp:67
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_12x12
@ SRGB8_Alpha8_ASTC_12x12
Definition
qsgcompressedtexture.cpp:192
QInternalGLTextureFormat::RGB16F
@ RGB16F
Definition
qsgcompressedtexture.cpp:116
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_6x5
@ SRGB8_Alpha8_ASTC_6x5
Definition
qsgcompressedtexture.cpp:182
QInternalGLTextureFormat::RGB_BP_SIGNED_FLOAT
@ RGB_BP_SIGNED_FLOAT
Definition
qsgcompressedtexture.cpp:152
QInternalGLTextureFormat::SRGB8_Alpha8
@ SRGB8_Alpha8
Definition
qsgcompressedtexture.cpp:196
QInternalGLTextureFormat::RG16_UNorm
@ RG16_UNorm
Definition
qsgcompressedtexture.cpp:66
QInternalGLTextureFormat::R8_UNorm
@ R8_UNorm
Definition
qsgcompressedtexture.cpp:60
QInternalGLTextureFormat::R16F
@ R16F
Definition
qsgcompressedtexture.cpp:114
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_5x5
@ SRGB8_Alpha8_ASTC_5x5
Definition
qsgcompressedtexture.cpp:181
QInternalGLTextureFormat::RGBA_DXT1
@ RGBA_DXT1
Definition
qsgcompressedtexture.cpp:144
QInternalGLTextureFormat::RGBA16_UNorm
@ RGBA16_UNorm
Definition
qsgcompressedtexture.cpp:68
QInternalGLTextureFormat::RGB8_SNorm
@ RGB8_SNorm
Definition
qsgcompressedtexture.cpp:73
QInternalGLTextureFormat::RGBA32U
@ RGBA32U
Definition
qsgcompressedtexture.cpp:95
QInternalGLTextureFormat::RGBFormat
@ RGBFormat
Definition
qsgcompressedtexture.cpp:206
QInternalGLTextureFormat::SRGB_Alpha_DXT3
@ SRGB_Alpha_DXT3
Definition
qsgcompressedtexture.cpp:199
QInternalGLTextureFormat::R11_EAC_UNorm
@ R11_EAC_UNorm
Definition
qsgcompressedtexture.cpp:154
QInternalGLTextureFormat::RGB8I
@ RGB8I
Definition
qsgcompressedtexture.cpp:100
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_10x6
@ SRGB8_Alpha8_ASTC_10x6
Definition
qsgcompressedtexture.cpp:188
QInternalGLTextureFormat::SRGB8_Alpha8_ASTC_8x5
@ SRGB8_Alpha8_ASTC_8x5
Definition
qsgcompressedtexture.cpp:184
QInternalGLTextureFormat::R8U
@ R8U
Definition
qsgcompressedtexture.cpp:82
QInternalGLTextureFormat::RG32U
@ RG32U
Definition
qsgcompressedtexture.cpp:93
QSGOpenGLAtlasTexture
Definition
qsgcompressedtexture_p.h:63
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
quick
scenegraph
compressedtexture
qsgcompressedtexture_p.h
Generated on
for Qt by
1.18.0