3#include "gli/format.hpp"
7 TextureFormat formatMap[] = {
8 TextureFormat::Unknown,
10 TextureFormat::Unknown,
11 TextureFormat::Unknown,
12 TextureFormat::Unknown,
13 TextureFormat::Unknown,
14 TextureFormat::Unknown,
15 TextureFormat::Unknown,
16 TextureFormat::Unknown,
17 TextureFormat::Unknown,
19 TextureFormat::R8_UNORM,
20 TextureFormat::R8_SNORM,
21 TextureFormat::Unknown,
22 TextureFormat::Unknown,
23 TextureFormat::R8_UINT,
24 TextureFormat::R8_UINT,
25 TextureFormat::Unknown,
27 TextureFormat::R8G8_UNORM,
28 TextureFormat::R8G8_SNORM,
29 TextureFormat::Unknown,
30 TextureFormat::Unknown,
31 TextureFormat::R8G8_UINT,
32 TextureFormat::R8G8_SINT,
33 TextureFormat::Unknown,
35 TextureFormat::R8G8B8_UNORM,
36 TextureFormat::R8G8B8_SNORM,
37 TextureFormat::Unknown,
38 TextureFormat::Unknown,
39 TextureFormat::R8G8B8_UINT,
40 TextureFormat::R8G8B8_SINT,
41 TextureFormat::R8G8B8_UNORM_SRGB,
43 TextureFormat::B8G8R8,
44 TextureFormat::Unknown,
45 TextureFormat::Unknown,
46 TextureFormat::Unknown,
47 TextureFormat::Unknown,
48 TextureFormat::Unknown,
49 TextureFormat::Unknown,
51 TextureFormat::R8G8B8A8_UNORM,
52 TextureFormat::R8G8B8A8_SNORM,
53 TextureFormat::Unknown,
54 TextureFormat::Unknown,
55 TextureFormat::R8G8B8A8_UINT,
56 TextureFormat::R8G8B8A8_SINT,
57 TextureFormat::R8G8B8A8_UNORM_SRGB,
59 TextureFormat::B8G8R8A8,
60 TextureFormat::Unknown,
61 TextureFormat::Unknown,
62 TextureFormat::Unknown,
63 TextureFormat::Unknown,
64 TextureFormat::Unknown,
65 TextureFormat::Unknown,
67 TextureFormat::R8G8B8A8_UNORM,
68 TextureFormat::R8G8B8A8_SNORM,
69 TextureFormat::Unknown,
70 TextureFormat::Unknown,
71 TextureFormat::R8G8B8A8_UINT,
72 TextureFormat::R8G8B8A8_SINT,
73 TextureFormat::R8G8B8A8_UNORM_SRGB,
75 TextureFormat::R10G10B10A2_UNORM,
76 TextureFormat::Unknown,
77 TextureFormat::Unknown,
78 TextureFormat::Unknown,
79 TextureFormat::R10G10B10A2_UINT,
80 TextureFormat::Unknown,
82 TextureFormat::Unknown,
83 TextureFormat::Unknown,
84 TextureFormat::Unknown,
85 TextureFormat::Unknown,
86 TextureFormat::Unknown,
87 TextureFormat::Unknown,
89 TextureFormat::R16_UNORM,
90 TextureFormat::R16_SNORM,
91 TextureFormat::Unknown,
92 TextureFormat::Unknown,
93 TextureFormat::R16_UINT,
94 TextureFormat::R16_SINT,
95 TextureFormat::R16_FLOAT,
97 TextureFormat::R16G16_UNORM,
98 TextureFormat::R16G16_SNORM,
99 TextureFormat::Unknown,
100 TextureFormat::Unknown,
101 TextureFormat::R16G16_UINT,
102 TextureFormat::R16G16_SINT,
103 TextureFormat::R16G16_FLOAT,
105 TextureFormat::R16G16B16_UNORM,
106 TextureFormat::R16G16B16_SNORM,
107 TextureFormat::Unknown,
108 TextureFormat::Unknown,
109 TextureFormat::R16G16B16_UINT,
110 TextureFormat::R16G16B16_SINT,
111 TextureFormat::R16G16B16_FLOAT,
113 TextureFormat::R16G16B16A16_UNORM,
114 TextureFormat::R16G16B16A16_SNORM,
115 TextureFormat::Unknown,
116 TextureFormat::Unknown,
117 TextureFormat::R16G16B16A16_UINT,
118 TextureFormat::R16G16B16A16_SINT,
119 TextureFormat::R16G16B16A16_FLOAT,
121 TextureFormat::R32_UINT,
122 TextureFormat::R32_SINT,
123 TextureFormat::R32_FLOAT,
125 TextureFormat::R32G32_UINT,
126 TextureFormat::R32G32_SINT,
127 TextureFormat::R32G32_FLOAT,
129 TextureFormat::R32G32B32_UINT,
130 TextureFormat::R32G32B32_SINT,
131 TextureFormat::R32G32B32_FLOAT,
133 TextureFormat::R32G32B32A32_UINT,
134 TextureFormat::R32G32B32A32_SINT,
135 TextureFormat::R32G32B32A32_FLOAT,
137 TextureFormat::Unknown,
138 TextureFormat::Unknown,
139 TextureFormat::Unknown,
141 TextureFormat::Unknown,
142 TextureFormat::Unknown,
143 TextureFormat::Unknown,
145 TextureFormat::Unknown,
146 TextureFormat::Unknown,
147 TextureFormat::Unknown,
149 TextureFormat::Unknown,
150 TextureFormat::Unknown,
151 TextureFormat::Unknown,
153 TextureFormat::R11G11B10_FLOAT,
154 TextureFormat::R9G9B9E5_FLOAT,
156 TextureFormat::D16_UNORM,
157 TextureFormat::D24_UNORM,
158 TextureFormat::D32_FLOAT,
159 TextureFormat::Unknown,
160 TextureFormat::Unknown,
161 TextureFormat::D24S8_UNORM,
162 TextureFormat::Unknown,
164 TextureFormat::Unknown,
165 TextureFormat::Unknown,
166 TextureFormat::BC1_UNORM,
167 TextureFormat::BC1_UNORM_SRGB,
168 TextureFormat::BC2_UNORM,
169 TextureFormat::BC2_UNORM_SRGB,
170 TextureFormat::BC3_UNORM,
171 TextureFormat::BC3_UNORM_SRGB,
172 TextureFormat::BC4_UNORM,
173 TextureFormat::BC4_SNORM,
174 TextureFormat::BC5_UNORM,
175 TextureFormat::BC5_SNORM,
176 TextureFormat::BC6H_UNSIGNED_FLOAT_RGB,
177 TextureFormat::BC6H_SIGNED_FLOAT_RGB,
178 TextureFormat::BC7_UNORM_RGBA,
179 TextureFormat::BC7_UNORM_SRGBA,
181 TextureFormat::ETC2_BLOCK8_UNORM_RGB,
182 TextureFormat::ETC2_BLOCK8_UNORM_SRGB,
183 TextureFormat::Unknown,
184 TextureFormat::Unknown,
185 TextureFormat::ETC2_BLOCK16_UNORM_RGBA,
186 TextureFormat::ETC2_BLOCK16_UNORM_SRGBA,
187 TextureFormat::EAC_BLOCK8_UNSIGNED_FLOAT_R,
188 TextureFormat::EAC_BLOCK8_SIGNED_FLOAT_R,
189 TextureFormat::EAC_BLOCK16_UNSIGNED_FLOAT_RG,
190 TextureFormat::EAC_BLOCK16_SIGNED_FLOAT_RG,
192 TextureFormat::ASTC_4x4_UNORM_RGBA,
193 TextureFormat::ASTC_4x4_UNORM_SRGBA,
194 TextureFormat::ASTC_5x4_UNORM_RGBA,
195 TextureFormat::ASTC_5x4_UNORM_SRGBA,
196 TextureFormat::ASTC_5x5_UNORM_RGBA,
197 TextureFormat::ASTC_5x5_UNORM_SRGBA,
198 TextureFormat::ASTC_6x5_UNORM_RGBA,
199 TextureFormat::ASTC_6x5_UNORM_SRGBA,
200 TextureFormat::ASTC_6x6_UNORM_RGBA,
201 TextureFormat::ASTC_6x6_UNORM_SRGBA,
202 TextureFormat::ASTC_8x5_UNORM_RGBA,
203 TextureFormat::ASTC_8x5_UNORM_SRGBA,
204 TextureFormat::ASTC_8x6_UNORM_RGBA,
205 TextureFormat::ASTC_8x6_UNORM_SRGBA,
206 TextureFormat::ASTC_8x8_UNORM_RGBA,
207 TextureFormat::ASTC_8x8_UNORM_SRGBA,
208 TextureFormat::ASTC_10x5_UNORM_RGBA,
209 TextureFormat::ASTC_10x5_UNORM_SRGBA,
210 TextureFormat::ASTC_10x6_UNORM_RGBA,
211 TextureFormat::ASTC_10x6_UNORM_SRGBA,
212 TextureFormat::ASTC_10x8_UNORM_RGBA,
213 TextureFormat::ASTC_10x8_UNORM_SRGBA,
214 TextureFormat::ASTC_10x10_UNORM_RGBA,
215 TextureFormat::ASTC_10x10_UNORM_SRGBA,
216 TextureFormat::ASTC_12x10_UNORM_RGBA,
217 TextureFormat::ASTC_12x10_UNORM_SRGBA,
218 TextureFormat::ASTC_12x12_UNORM_RGBA,
219 TextureFormat::ASTC_12x12_UNORM_SRGBA,
221 TextureFormat::PVRTC1_4BPP_UNORM_RGB,
222 TextureFormat::Unknown,
223 TextureFormat::PVRTC1_2BPP_UNORM_RGB,
224 TextureFormat::Unknown,
225 TextureFormat::PVRTC1_4BPP_UNORM_RGBA,
226 TextureFormat::Unknown,
227 TextureFormat::PVRTC1_2BPP_UNORM_RGBA,
228 TextureFormat::Unknown,
229 TextureFormat::Unknown,
230 TextureFormat::Unknown,
231 TextureFormat::Unknown,
232 TextureFormat::Unknown,
234 TextureFormat::Unknown,
235 TextureFormat::Unknown,
236 TextureFormat::Unknown,
237 TextureFormat::Unknown,
239 TextureFormat::Unknown,
240 TextureFormat::A8_UNORM,
241 TextureFormat::Unknown,
242 TextureFormat::Unknown,
243 TextureFormat::Unknown,
244 TextureFormat::Unknown,
246 TextureFormat::Unknown,
247 TextureFormat::Unknown,
249 TextureFormat::Unknown,
252 static_assert(
sizeof(formatMap) /
sizeof(formatMap[0]) == gli::FORMAT_LAST + 1,
"GLI Texture format mapping incompatible.");
Contains all Cogs related functionality.