GLI
0.6.0
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
D:
Source
G-Truc
gli
gli
core
format.hpp
Go to the documentation of this file.
1
29
#pragma once
30
31
namespace
gli
32
{
33
enum
format
34
{
35
// unorm formats
36
FORMAT_R8_UNORM
= 0,
FORMAT_FIRST
=
FORMAT_R8_UNORM
,
37
FORMAT_RG8_UNORM
,
38
FORMAT_RGB8_UNORM
,
39
FORMAT_RGBA8_UNORM
,
40
41
FORMAT_R16_UNORM
,
42
FORMAT_RG16_UNORM
,
43
FORMAT_RGB16_UNORM
,
44
FORMAT_RGBA16_UNORM
,
45
46
// snorm formats
47
FORMAT_R8_SNORM
,
48
FORMAT_RG8_SNORM
,
49
FORMAT_RGB8_SNORM
,
50
FORMAT_RGBA8_SNORM
,
51
52
FORMAT_R16_SNORM
,
53
FORMAT_RG16_SNORM
,
54
FORMAT_RGB16_SNORM
,
55
FORMAT_RGBA16_SNORM
,
56
57
// Unsigned integer formats
58
FORMAT_R8_UINT
,
59
FORMAT_RG8_UINT
,
60
FORMAT_RGB8_UINT
,
61
FORMAT_RGBA8_UINT
,
62
63
FORMAT_R16_UINT
,
64
FORMAT_RG16_UINT
,
65
FORMAT_RGB16_UINT
,
66
FORMAT_RGBA16_UINT
,
67
68
FORMAT_R32_UINT
,
69
FORMAT_RG32_UINT
,
70
FORMAT_RGB32_UINT
,
71
FORMAT_RGBA32_UINT
,
72
73
// Signed integer formats
74
FORMAT_R8_SINT
,
75
FORMAT_RG8_SINT
,
76
FORMAT_RGB8_SINT
,
77
FORMAT_RGBA8_SINT
,
78
79
FORMAT_R16_SINT
,
80
FORMAT_RG16_SINT
,
81
FORMAT_RGB16_SINT
,
82
FORMAT_RGBA16_SINT
,
83
84
FORMAT_R32_SINT
,
85
FORMAT_RG32_SINT
,
86
FORMAT_RGB32_SINT
,
87
FORMAT_RGBA32_SINT
,
88
89
// Floating formats
90
FORMAT_R16_SFLOAT
,
91
FORMAT_RG16_SFLOAT
,
92
FORMAT_RGB16_SFLOAT
,
93
FORMAT_RGBA16_SFLOAT
,
94
95
FORMAT_R32_SFLOAT
,
96
FORMAT_RG32_SFLOAT
,
97
FORMAT_RGB32_SFLOAT
,
98
FORMAT_RGBA32_SFLOAT
,
99
100
// sRGB formats
101
FORMAT_R8_SRGB
,
102
FORMAT_RG8_SRGB
,
103
FORMAT_RGB8_SRGB
,
104
FORMAT_RGBA8_SRGB
,
105
106
// Packed formats
107
FORMAT_RGB10A2_UNORM
,
108
FORMAT_RGB10A2_UINT
,
109
FORMAT_RGB9E5_UFLOAT
,
110
FORMAT_RG11B10_UFLOAT
,
111
FORMAT_RG3B2_UNORM
,
112
FORMAT_R5G6B5_UNORM
,
113
FORMAT_RGB5A1_UNORM
,
114
FORMAT_RGBA4_UNORM
,
115
116
// Swizzle formats
117
FORMAT_BGR8_UNORM
,
118
FORMAT_BGRA8_UNORM
,
119
FORMAT_BGR8_SRGB
,
120
FORMAT_BGRA8_SRGB
,
121
122
// Luminance Alpha formats
123
FORMAT_L8_UNORM
,
124
FORMAT_A8_UNORM
,
125
FORMAT_LA8_UNORM
,
126
FORMAT_L16_UNORM
,
127
FORMAT_A16_UNORM
,
128
FORMAT_LA16_UNORM
,
129
130
// Depth formats
131
FORMAT_D16_UNORM
,
132
FORMAT_D24_UNORM
,
133
FORMAT_D24S8_UNORM
,
134
FORMAT_D32_UFLOAT
,
135
FORMAT_D32_UFLOAT_S8_UNORM
,
136
137
// Compressed formats
138
FORMAT_RGB_DXT1_UNORM
,
FORMAT_COMPRESSED_FIRST
=
FORMAT_RGB_DXT1_UNORM
,
139
FORMAT_RGBA_DXT1_UNORM
,
140
FORMAT_RGBA_DXT3_UNORM
,
141
FORMAT_RGBA_DXT5_UNORM
,
142
FORMAT_R_ATI1N_UNORM
,
143
FORMAT_R_ATI1N_SNORM
,
144
FORMAT_RG_ATI2N_UNORM
,
145
FORMAT_RG_ATI2N_SNORM
,
146
FORMAT_RGB_BP_UFLOAT
,
147
FORMAT_RGB_BP_SFLOAT
,
148
FORMAT_RGB_BP_UNORM
,
149
FORMAT_RGB_PVRTC_8X8_UNORM
,
150
FORMAT_RGB_PVRTC_16X8_UNORM
,
151
FORMAT_RGBA_PVRTC_8X8_UNORM
,
152
FORMAT_RGBA_PVRTC_16X8_UNORM
,
153
FORMAT_RGBA_PVRTC2_8X8_UNORM
,
154
FORMAT_RGBA_PVRTC2_16X8_UNORM
,
155
FORMAT_RGB_ATC_UNORM
,
156
FORMAT_RGBA_ATC_EXPLICIT_UNORM
,
157
FORMAT_RGBA_ATC_INTERPOLATED_UNORM
,
158
FORMAT_RGB_ETC_UNORM
,
159
FORMAT_RGBA_ETC2_PUNCHTHROUGH_UNORM
,
160
FORMAT_RGBA_ETC2_UNORM
,
161
FORMAT_R11_EAC_UNORM
,
162
FORMAT_R11_EAC_SNORM
,
163
FORMAT_RG11_EAC_UNORM
,
164
FORMAT_RG11_EAC_SNORM
,
165
FORMAT_RGBA_ASTC_4X4_UNORM
,
166
FORMAT_RGBA_ASTC_5X4_UNORM
,
167
FORMAT_RGBA_ASTC_5X5_UNORM
,
168
FORMAT_RGBA_ASTC_6X5_UNORM
,
169
FORMAT_RGBA_ASTC_6X6_UNORM
,
170
FORMAT_RGBA_ASTC_8X5_UNORM
,
171
FORMAT_RGBA_ASTC_8X6_UNORM
,
172
FORMAT_RGBA_ASTC_8X8_UNORM
,
173
FORMAT_RGBA_ASTC_10X5_UNORM
,
174
FORMAT_RGBA_ASTC_10X6_UNORM
,
175
FORMAT_RGBA_ASTC_10X8_UNORM
,
176
FORMAT_RGBA_ASTC_10X10_UNORM
,
177
FORMAT_RGBA_ASTC_12X10_UNORM
,
178
FORMAT_RGBA_ASTC_12X12_UNORM
,
179
180
// Compressed sRGB formats
181
FORMAT_RGB_DXT1_SRGB
,
182
FORMAT_RGBA_DXT1_SRGB
,
183
FORMAT_RGBA_DXT3_SRGB
,
184
FORMAT_RGBA_DXT5_SRGB
,
185
FORMAT_RGB_BP_SRGB
,
186
FORMAT_RGB_PVRTC_8X8_SRGB
,
187
FORMAT_RGB_PVRTC_16X8_SRGB
,
188
FORMAT_RGBA_PVRTC_8X8_SRGB
,
189
FORMAT_RGBA_PVRTC_16X8_SRGB
,
190
FORMAT_RGBA_PVRTC2_8X8_SRGB
,
191
FORMAT_RGBA_PVRTC2_16X8_SRGB
,
192
FORMAT_RGB_ETC_SRGB
,
193
FORMAT_RGBA_ETC2_PUNCHTHROUGH_SRGB
,
194
FORMAT_RGBA_ETC2_SRGB
,
195
FORMAT_RGBA_ASTC_4X4_SRGB
,
196
FORMAT_RGBA_ASTC_5X4_SRGB
,
197
FORMAT_RGBA_ASTC_5X5_SRGB
,
198
FORMAT_RGBA_ASTC_6X5_SRGB
,
199
FORMAT_RGBA_ASTC_6X6_SRGB
,
200
FORMAT_RGBA_ASTC_8X5_SRGB
,
201
FORMAT_RGBA_ASTC_8X6_SRGB
,
202
FORMAT_RGBA_ASTC_8X8_SRGB
,
203
FORMAT_RGBA_ASTC_10X5_SRGB
,
204
FORMAT_RGBA_ASTC_10X6_SRGB
,
205
FORMAT_RGBA_ASTC_10X8_SRGB
,
206
FORMAT_RGBA_ASTC_10X10_SRGB
,
207
FORMAT_RGBA_ASTC_12X10_SRGB
,
208
FORMAT_RGBA_ASTC_12X12_SRGB
,
FORMAT_COMPRESSED_LAST
=
FORMAT_RGBA_ASTC_12X12_SRGB
,
FORMAT_LAST
=
FORMAT_RGBA_ASTC_12X12_SRGB
209
};
210
211
enum
212
{
213
FORMAT_INVALID
= -1,
214
FORMAT_COUNT
=
FORMAT_LAST
-
FORMAT_FIRST
+ 1,
215
FORMAT_COMPRESSED_COUNT
=
FORMAT_COMPRESSED_LAST
-
FORMAT_COMPRESSED_FIRST
+ 1
216
};
217
218
inline
bool
is_compressed
(
format
const
& Format)
219
{
220
return
Format >=
FORMAT_COMPRESSED_FIRST
&& Format <=
FORMAT_COMPRESSED_LAST
;
221
}
222
223
inline
bool
is_valid
(
format
const
& Format)
224
{
225
return
Format >=
FORMAT_FIRST
&& Format <=
FORMAT_LAST
;
226
}
227
228
std::uint32_t
block_size
(
format
const
& Format);
229
std::uint32_t
block_dimensions_x
(
format
const
& Format);
230
std::uint32_t
block_dimensions_y
(
format
const
& Format);
231
std::uint32_t
block_dimensions_z
(
format
const
& Format);
232
std::uint32_t
component_count
(
format
const
& Format);
233
}
//namespace gli
234
235
#include "format.inl"
gli::FORMAT_R16_UNORM
Definition:
format.hpp:41
gli::FORMAT_R8_SNORM
Definition:
format.hpp:47
gli::FORMAT_RGBA_DXT3_SRGB
Definition:
format.hpp:183
gli::FORMAT_FIRST
Definition:
format.hpp:36
gli::FORMAT_RG_ATI2N_UNORM
Definition:
format.hpp:144
gli::FORMAT_RGBA_ASTC_6X5_UNORM
Definition:
format.hpp:168
gli::FORMAT_A16_UNORM
Definition:
format.hpp:127
gli::FORMAT_RGBA16_UNORM
Definition:
format.hpp:44
gli::FORMAT_RGBA_PVRTC_16X8_SRGB
Definition:
format.hpp:189
gli::FORMAT_RGBA_ASTC_5X5_SRGB
Definition:
format.hpp:197
gli::FORMAT_RG16_SINT
Definition:
format.hpp:80
gli::FORMAT_RGBA_ATC_EXPLICIT_UNORM
Definition:
format.hpp:156
gli::FORMAT_R5G6B5_UNORM
Definition:
format.hpp:112
gli::FORMAT_RGBA_ASTC_10X10_UNORM
Definition:
format.hpp:176
gli::FORMAT_RGBA_ASTC_12X12_UNORM
Definition:
format.hpp:178
gli::FORMAT_RGBA16_SFLOAT
Definition:
format.hpp:93
gli::FORMAT_RGBA_ASTC_4X4_SRGB
Definition:
format.hpp:195
gli::FORMAT_LAST
Definition:
format.hpp:208
gli::block_dimensions_z
std::uint32_t block_dimensions_z(format const &Format)
gli::FORMAT_RGB8_SINT
Definition:
format.hpp:76
gli::FORMAT_RGBA_ASTC_12X10_UNORM
Definition:
format.hpp:177
gli::FORMAT_RGBA_PVRTC2_8X8_UNORM
Definition:
format.hpp:153
gli::FORMAT_RGBA16_UINT
Definition:
format.hpp:66
gli::FORMAT_R11_EAC_UNORM
Definition:
format.hpp:161
gli::FORMAT_LA16_UNORM
Definition:
format.hpp:128
gli::FORMAT_RGBA_ASTC_10X5_UNORM
Definition:
format.hpp:173
gli::FORMAT_RGBA_ASTC_6X6_SRGB
Definition:
format.hpp:199
gli::FORMAT_RG8_SINT
Definition:
format.hpp:75
gli::FORMAT_RGB32_UINT
Definition:
format.hpp:70
gli::FORMAT_R32_SINT
Definition:
format.hpp:84
gli::FORMAT_BGR8_SRGB
Definition:
format.hpp:119
gli::FORMAT_RGBA16_SINT
Definition:
format.hpp:82
gli::FORMAT_RGBA_ASTC_10X6_UNORM
Definition:
format.hpp:174
gli::FORMAT_BGR8_UNORM
Definition:
format.hpp:117
gli::FORMAT_RGBA8_UINT
Definition:
format.hpp:61
gli::FORMAT_D32_UFLOAT
Definition:
format.hpp:134
gli::FORMAT_R8_SINT
Definition:
format.hpp:74
gli::FORMAT_RGBA_ASTC_5X5_UNORM
Definition:
format.hpp:167
gli::FORMAT_RGBA_ASTC_6X6_UNORM
Definition:
format.hpp:169
gli::FORMAT_R32_SFLOAT
Definition:
format.hpp:95
gli::FORMAT_R11_EAC_SNORM
Definition:
format.hpp:162
gli::FORMAT_RG8_UNORM
Definition:
format.hpp:37
gli::FORMAT_RGBA_PVRTC_8X8_SRGB
Definition:
format.hpp:188
gli::FORMAT_RGB_DXT1_UNORM
Definition:
format.hpp:138
gli::FORMAT_RG11B10_UFLOAT
Definition:
format.hpp:110
gli::FORMAT_RGB_PVRTC_8X8_SRGB
Definition:
format.hpp:186
gli::FORMAT_RGBA8_UNORM
Definition:
format.hpp:39
gli::FORMAT_R8_UINT
Definition:
format.hpp:58
gli::FORMAT_RGBA_ASTC_12X10_SRGB
Definition:
format.hpp:207
gli
Definition:
addressing.hpp:33
gli::FORMAT_RGB16_UNORM
Definition:
format.hpp:43
gli::FORMAT_RGBA32_SINT
Definition:
format.hpp:87
gli::FORMAT_RGBA16_SNORM
Definition:
format.hpp:55
gli::component_count
std::uint32_t component_count(format const &Format)
gli::FORMAT_RGBA4_UNORM
Definition:
format.hpp:114
gli::FORMAT_RGB8_SRGB
Definition:
format.hpp:103
gli::FORMAT_RGBA_ASTC_8X8_SRGB
Definition:
format.hpp:202
gli::FORMAT_RGBA8_SINT
Definition:
format.hpp:77
gli::FORMAT_RGB_ETC_SRGB
Definition:
format.hpp:192
gli::FORMAT_RGB_BP_SFLOAT
Definition:
format.hpp:147
gli::FORMAT_RGBA_ASTC_8X6_SRGB
Definition:
format.hpp:201
gli::FORMAT_RG32_UINT
Definition:
format.hpp:69
gli::FORMAT_LA8_UNORM
Definition:
format.hpp:125
gli::FORMAT_RGBA_ASTC_6X5_SRGB
Definition:
format.hpp:198
gli::FORMAT_RGB_DXT1_SRGB
Definition:
format.hpp:181
gli::FORMAT_D24_UNORM
Definition:
format.hpp:132
gli::FORMAT_RGBA_ATC_INTERPOLATED_UNORM
Definition:
format.hpp:157
gli::FORMAT_BGRA8_UNORM
Definition:
format.hpp:118
gli::FORMAT_RGBA_PVRTC_8X8_UNORM
Definition:
format.hpp:151
gli::FORMAT_RGBA_ASTC_8X8_UNORM
Definition:
format.hpp:172
gli::FORMAT_RG16_SFLOAT
Definition:
format.hpp:91
gli::FORMAT_RGBA_ASTC_10X5_SRGB
Definition:
format.hpp:203
gli::FORMAT_D16_UNORM
Definition:
format.hpp:131
gli::FORMAT_RG16_UNORM
Definition:
format.hpp:42
gli::FORMAT_D32_UFLOAT_S8_UNORM
Definition:
format.hpp:135
gli::FORMAT_RGB8_SNORM
Definition:
format.hpp:49
gli::FORMAT_RGBA_ASTC_10X8_SRGB
Definition:
format.hpp:205
gli::FORMAT_RGBA_ASTC_5X4_SRGB
Definition:
format.hpp:196
gli::FORMAT_RG16_UINT
Definition:
format.hpp:64
gli::FORMAT_RG11_EAC_SNORM
Definition:
format.hpp:164
gli::FORMAT_RGBA_DXT1_SRGB
Definition:
format.hpp:182
gli::FORMAT_RGB_PVRTC_16X8_UNORM
Definition:
format.hpp:150
gli::FORMAT_COUNT
Definition:
format.hpp:214
gli::FORMAT_RGBA8_SNORM
Definition:
format.hpp:50
gli::FORMAT_RGB16_SINT
Definition:
format.hpp:81
gli::is_compressed
bool is_compressed(format const &Format)
Definition:
format.hpp:218
gli::FORMAT_RGB8_UNORM
Definition:
format.hpp:38
gli::FORMAT_RGBA_DXT5_UNORM
Definition:
format.hpp:141
gli::FORMAT_R32_UINT
Definition:
format.hpp:68
gli::FORMAT_RGBA_DXT5_SRGB
Definition:
format.hpp:184
gli::FORMAT_RGB_ETC_UNORM
Definition:
format.hpp:158
gli::FORMAT_RGBA32_SFLOAT
Definition:
format.hpp:98
gli::FORMAT_RGB5A1_UNORM
Definition:
format.hpp:113
gli::FORMAT_RGB_PVRTC_8X8_UNORM
Definition:
format.hpp:149
gli::FORMAT_RGBA_PVRTC2_8X8_SRGB
Definition:
format.hpp:190
gli::FORMAT_RGB_BP_SRGB
Definition:
format.hpp:185
gli::FORMAT_RGBA_ETC2_SRGB
Definition:
format.hpp:194
gli::FORMAT_RGBA_ASTC_4X4_UNORM
Definition:
format.hpp:165
gli::FORMAT_RG16_SNORM
Definition:
format.hpp:53
gli::FORMAT_R_ATI1N_UNORM
Definition:
format.hpp:142
gli::FORMAT_RG8_UINT
Definition:
format.hpp:59
gli::FORMAT_RGBA_ETC2_PUNCHTHROUGH_SRGB
Definition:
format.hpp:193
gli::FORMAT_RGBA_ETC2_UNORM
Definition:
format.hpp:160
gli::FORMAT_RGB_BP_UFLOAT
Definition:
format.hpp:146
gli::FORMAT_RGBA32_UINT
Definition:
format.hpp:71
gli::FORMAT_RGBA_ASTC_10X10_SRGB
Definition:
format.hpp:206
gli::FORMAT_BGRA8_SRGB
Definition:
format.hpp:120
gli::FORMAT_RGB16_SNORM
Definition:
format.hpp:54
gli::FORMAT_RGBA_ASTC_12X12_SRGB
Definition:
format.hpp:208
gli::FORMAT_INVALID
Definition:
format.hpp:213
gli::FORMAT_RG_ATI2N_SNORM
Definition:
format.hpp:145
gli::FORMAT_RGBA8_SRGB
Definition:
format.hpp:104
gli::FORMAT_R8_UNORM
Definition:
format.hpp:36
gli::FORMAT_RG8_SRGB
Definition:
format.hpp:102
gli::FORMAT_D24S8_UNORM
Definition:
format.hpp:133
gli::FORMAT_RGB32_SFLOAT
Definition:
format.hpp:97
gli::FORMAT_RGBA_ASTC_8X6_UNORM
Definition:
format.hpp:171
gli::FORMAT_RGBA_PVRTC2_16X8_SRGB
Definition:
format.hpp:191
gli::FORMAT_RGB_ATC_UNORM
Definition:
format.hpp:155
gli::FORMAT_RG8_SNORM
Definition:
format.hpp:48
gli::FORMAT_RGB32_SINT
Definition:
format.hpp:86
gli::FORMAT_RGBA_DXT1_UNORM
Definition:
format.hpp:139
gli::FORMAT_RG11_EAC_UNORM
Definition:
format.hpp:163
gli::FORMAT_COMPRESSED_COUNT
Definition:
format.hpp:215
gli::FORMAT_R8_SRGB
Definition:
format.hpp:101
gli::FORMAT_RGB_PVRTC_16X8_SRGB
Definition:
format.hpp:187
gli::FORMAT_RGB9E5_UFLOAT
Definition:
format.hpp:109
gli::FORMAT_RGB10A2_UNORM
Definition:
format.hpp:107
gli::FORMAT_RGBA_ASTC_8X5_SRGB
Definition:
format.hpp:200
gli::FORMAT_RGB16_UINT
Definition:
format.hpp:65
gli::FORMAT_RGB16_SFLOAT
Definition:
format.hpp:92
gli::FORMAT_RG3B2_UNORM
Definition:
format.hpp:111
gli::FORMAT_RGB_BP_UNORM
Definition:
format.hpp:148
gli::FORMAT_RGBA_ETC2_PUNCHTHROUGH_UNORM
Definition:
format.hpp:159
gli::is_valid
bool is_valid(format const &Format)
Definition:
format.hpp:223
gli::FORMAT_RGBA_ASTC_5X4_UNORM
Definition:
format.hpp:166
gli::FORMAT_COMPRESSED_FIRST
Definition:
format.hpp:138
gli::FORMAT_R16_UINT
Definition:
format.hpp:63
gli::FORMAT_RGBA_PVRTC_16X8_UNORM
Definition:
format.hpp:152
gli::FORMAT_RG32_SINT
Definition:
format.hpp:85
gli::FORMAT_RGBA_ASTC_10X8_UNORM
Definition:
format.hpp:175
gli::FORMAT_RGBA_ASTC_10X6_SRGB
Definition:
format.hpp:204
gli::FORMAT_RG32_SFLOAT
Definition:
format.hpp:96
gli::FORMAT_L16_UNORM
Definition:
format.hpp:126
gli::FORMAT_RGB10A2_UINT
Definition:
format.hpp:108
gli::block_dimensions_y
std::uint32_t block_dimensions_y(format const &Format)
gli::FORMAT_RGBA_PVRTC2_16X8_UNORM
Definition:
format.hpp:154
gli::FORMAT_L8_UNORM
Definition:
format.hpp:123
gli::FORMAT_RGB8_UINT
Definition:
format.hpp:60
gli::FORMAT_R_ATI1N_SNORM
Definition:
format.hpp:143
gli::FORMAT_RGBA_DXT3_UNORM
Definition:
format.hpp:140
gli::FORMAT_RGBA_ASTC_8X5_UNORM
Definition:
format.hpp:170
gli::FORMAT_A8_UNORM
Definition:
format.hpp:124
gli::block_dimensions_x
std::uint32_t block_dimensions_x(format const &Format)
gli::FORMAT_R16_SINT
Definition:
format.hpp:79
gli::FORMAT_COMPRESSED_LAST
Definition:
format.hpp:208
gli::FORMAT_R16_SFLOAT
Definition:
format.hpp:90
gli::format
format
Definition:
format.hpp:33
gli::block_size
std::uint32_t block_size(format const &Format)
gli::FORMAT_R16_SNORM
Definition:
format.hpp:52
Generated by
1.8.10