{.deadCodeElim: on.}
const
endianRefRev* = 16909060 # 0x01020304 -> #define KTX_ENDIAN_REF_REV (0x01020304)
type
GlFormatSize* = ref object
paletteSizeInBits*: uint
blockSizeInBits*: uint
blockWidth*: uint# in texels
blockHeight*: uint # in texels
blockDepth*: uint # in texels
flags*: uint
#currently only uncommenting and adding to GlFormats and
# aFormatSize when needed
GlFormats* = enum
# 8 bits per component
#GL_RGB8 = 32849 #0x8051 # same as GL_RGB8_EXT and GL_RGB8_OES
GL_RGBA8 = 32856 # same as GL_RGBA8_EXT and GL_RGBA8_OES
# GL_R8 = 33321 #0x8229 # same as GL_R8_EXT
# GL_RG8 = 33323 #0x822B # same as GL_RG8_EXT
# GL_R8I = 33329 #0x8231
# GL_R8UI = 33330 #0x8232
# GL_RG8I = 33335 #0x8237
# GL_RG8UI = 33336 #0x8238
# GL_SRGB8 = 35905 #0x8C41 # same as GL_SRGB8_EXT
# GL_SRGB8_ALPHA8 = 35907 #0x8C43 # same as GL_SRGB8_ALPHA8_EXT
# GL_RGBA8UI = 36220 #0x8D7C # same as GL_RGBA8UI_EXT
# GL_RGB8UI = 36221 #0x8D7D # same as GL_RGB8UI_EXT
# GL_RGBA8I = 36238 #0x8D8E # same as GL_RGBA8I_EXT
# GL_RGB8I = 36239 # 0x8D8F # same as GL_RGB8I_EXT
# GL_R8_SNORM = 36756 #0x8F94
# GL_RG8_SNORM = 36757 #0x8F95
# GL_RGB8_SNORM = 36758 #0x8F96
# GL_RGBA8_SNORM = 36759 # 0x8F97
# GL_SR8 = 36797 #0x8FBD # same as GL_SR8_EXT
# GL_SRG8 = 36798 #0x8FBE # same as GL_SRG8_EXT
# # 16 bits per component
# GL_R16 = 0x822A # same as GL_R16_EXT
# GL_RG16 = 0x822C # same as GL_RG16_EXT
# GL_RGB16 = 0x8054 # same as GL_RGB16_EXT
# GL_RGBA16 = 0x805B # same as GL_RGBA16_EXT
# GL_R16_SNORM = 0x8F98 # same as GL_R16_SNORM_EXT
# GL_RG16_SNORM = 0x8F99 # same as GL_RG16_SNORM_EXT
# GL_RGB16_SNORM = 0x8F9A # same as GL_RGB16_SNORM_EXT
# GL_RGBA16_SNORM = 0x8F9B # same as GL_RGBA16_SNORM_EXT
# GL_R16UI = 0x8234
# GL_RG16UI = 0x823A
# GL_RGB16UI = 0x8D77 # same as GL_RGB16UI_EXT
# GL_RGBA16UI = 0x8D76 # same as GL_RGBA16UI_EXT
# GL_R16I = 0x8233
# GL_RG16I = 0x8239
# GL_RGB16I = 0x8D89 # same as GL_RGB16I_EXT
# GL_RGBA16I = 0x8D88 # same as GL_RGBA16I_EXT
# GL_R16F = 0x822D # same as GL_R16F_EXT
# GL_RG16F = 0x822F # same as GL_RG16F_EXT
# GL_RGB16F = 0x881B # same as GL_RGB16F_EXT and GL_RGB16F_ARB
# GL_RGBA16F = 0x881A # sama as GL_RGBA16F_EXT and GL_RGBA16F_ARB
# # 32 bits per component
# GL_R32UI = 0x8236
# GL_RG32UI = 0x823C
# GL_RGB32UI = 0x8D71 # same as GL_RGB32UI_EXT
# GL_RGBA32UI = 0x8D70 # same as GL_RGBA32UI_EXT
# GL_R32I = 0x8235
# GL_RG32I = 0x823B
# GL_RGB32I = 0x8D83 # same as GL_RGB32I_EXT
# GL_RGBA32I = 0x8D82 # same as GL_RGBA32I_EXT
# GL_R32F8 = 0x822E # same as GL_R32F_EXT
# GL_RG32F = 0x8230 # same as GL_RG32F_EXT
# GL_RGB32F = 0x8815 # same as GL_RGB32F_EXT and GL_RGB32F_ARB
# GL_RGBA32F = 0x8814 # same as GL_RGBA32F_EXT and GL_RGBA32F_ARB
# # Packed
# GL_R3_G3_B2 = 0x2A10
# GL_RGB4 = 0x804F # same as GL_RGB4_EXT
# GL_RGB5 = 0x8050 # same as GL_RGB5_EXT
# GL_RGB565 = 0x8D62 # same as GL_RGB565_EXT and GL_RGB565_OES
# GL_RGB10 = 0x8052 # same as GL_RGB10_EXT
# GL_RGB12 = 0x8053 # same as GL_RGB12_EXT
# GL_RGBA2 = 0x8055 # same as GL_RGBA2_EXT
# GL_RGBA4 = 0x8056 # same as GL_RGBA4_EXT and GL_RGBA4_OES
# GL_RGBA12 = 0x805A # same as GL_RGBA12_EXT
# GL_RGB5_A1 = 0x8057 # same as GL_RGB5_A1_EXT and GL_RGB5_A1_OES
# GL_RGB10_A2 = 0x8059 # same as GL_RGB10_A2_EXT
# GL_RGB10_A2UI = 0x906F
# GL_R11F_G11F_B10F = 0x8C3A # same as GL_R11F_G11F_B10F_APPLE and GL_R11F_G11F_B10F_EXT
# GL_RGB9_E5 = 0x8C3D # same as GL_RGB9_E5_APPLE and GL_RGB9_E5_EXT
# GL_COMPRESSED_RG 0x8226
# GL_COMPRESSED_RGB 0x84ED # same as GL_COMPRESSED_RGB_ARB
# GL_COMPRESSED_RGBA 0x84EE # same as GL_COMPRESSED_RGBA_ARB
# GL_COMPRESSED_SRGB 0x8C48 # same as GL_COMPRESSED_SRGB_EXT
# GL_COMPRESSED_SRGB_ALPHA 0x8C49 # same as GL_COMPRESSED_SRGB_ALPHA_EXT
# # S3TC/DXT/BC
# GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
# GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
# GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
# GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
# GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
# GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
# GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
# GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
# GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
# GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
# GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
# GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
# GL_COMPRESSED_RED_RGTC1 0x8DBB # same as GL_COMPRESSED_RED_RGTC1_EXT
# GL_COMPRESSED_RG_RGTC2 0x8DBD # same as GL_COMPRESSED_RG_RGTC2_EXT
# GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC # same as GL_COMPRESSED_SIGNED_RED_RGTC1_EXT
# GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE # same as GL_COMPRESSED_SIGNED_RG_RGTC2_EXT
# GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E # same as GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB
# GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F # same as GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB
# GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C # same as GL_COMPRESSED_RGBA_BPTC_UNORM_ARB
# GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D # same as GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB
# #
# # ETC
# #
# GL_ETC1_RGB8_OES 0x8D64
# GL_COMPRESSED_RGB8_ETC2 0x9274
# GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
# GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
# GL_COMPRESSED_SRGB8_ETC2 0x9275
# GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
# GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
# GL_COMPRESSED_R11_EAC 0x9270
# GL_COMPRESSED_RG11_EAC 0x9272
# GL_COMPRESSED_SIGNED_R11_EAC 0x9271
# GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
# #
# # PVRTC
# #
# GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
# GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
# GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
# GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
# GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137
# GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138
# GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54
# GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55
# GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56
# GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57
# GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0
# GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1
# #
# # ASTC
# #
# GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
# GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
# GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
# GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
# GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
# GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
# GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
# GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
# GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
# GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
# GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
# GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
# GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
# GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
# GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0
# GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1
# GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2
# GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3
# GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4
# GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5
# GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6
# GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7
# GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8
# GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8
# GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9
# #
# # ATC
# #
# GL_ATC_RGB_AMD 0x8C92
# GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
# GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
# #
# # Palletized (combined palette)
# #
# GL_PALETTE4_RGB8_OES 0x8B90
# GL_PALETTE4_RGBA8_OES 0x8B91
# GL_PALETTE4_R5_G6_B5_OES 0x8B92
# GL_PALETTE4_RGBA4_OES 0x8B93
# GL_PALETTE4_RGB5_A1_OES 0x8B94
# GL_PALETTE8_RGB8_OES 0x8B95
# GL_PALETTE8_RGBA8_OES 0x8B96
# GL_PALETTE8_R5_G6_B5_OES 0x8B97
# GL_PALETTE8_RGBA4_OES 0x8B98
# GL_PALETTE8_RGB5_A1_OES 0x8B99
# #
# # Palletized (separate palette)
# #
# GL_COLOR_INDEX1_EXT 0x80E2 # deprecated
# GL_COLOR_INDEX2_EXT 0x80E3 # deprecated
# GL_COLOR_INDEX4_EXT 0x80E4 # deprecated
# GL_COLOR_INDEX8_EXT 0x80E5 # deprecated
# GL_COLOR_INDEX12_EXT 0x80E6 # deprecated
# GL_COLOR_INDEX16_EXT 0x80E7 # deprecated
# #
# # Depth/stencil
# #
# GL_DEPTH_COMPONENT16 0x81A5 # same as GL_DEPTH_COMPONENT16_SGIX and GL_DEPTH_COMPONENT16_ARB
# GL_DEPTH_COMPONENT24 0x81A6 # same as GL_DEPTH_COMPONENT24_SGIX and GL_DEPTH_COMPONENT24_ARB
# GL_DEPTH_COMPONENT32 0x81A7 # same as GL_DEPTH_COMPONENT32_SGIX and GL_DEPTH_COMPONENT32_ARB and GL_DEPTH_COMPONENT32_OES
# GL_DEPTH_COMPONENT32F 0x8CAC # same as GL_DEPTH_COMPONENT32F_ARB
# GL_DEPTH_COMPONENT32F_NV 0x8DAB # note that this is different from GL_DEPTH_COMPONENT32F
# GL_STENCIL_INDEX1 0x8D46 # same as GL_STENCIL_INDEX1_EXT
# GL_STENCIL_INDEX4 0x8D47 # same as GL_STENCIL_INDEX4_EXT
# GL_STENCIL_INDEX8 0x8D48 # same as GL_STENCIL_INDEX8_EXT
# GL_STENCIL_INDEX16 0x8D49 # same as GL_STENCIL_INDEX16_EXT
# GL_DEPTH24_STENCIL8 0x88F0 # same as GL_DEPTH24_STENCIL8_EXT and GL_DEPTH24_STENCIL8_OES
# GL_DEPTH32F_STENCIL8 0x8CAD # same as GL_DEPTH32F_STENCIL8_ARB
# GL_DEPTH32F_STENCIL8_NV 0x8DAC # note that this is different from GL_DEPTH32F_STENCIL8
#[
Excerpt from the original gl_format.h from https://github.com/SaschaWillems/Vulkan:
in case i accidently messed up the hex converting.
Someday I should probably verify or find a way to get rid of this nonsense
Note: All values marked as deprecated by sascha/whoever in the original .h are not included here, such as GL_LUMINANCE32UI_EXT or GL_ALPHA8_SNORM
-------------------------------------------------------------------------------------------------------------------------------------------------
Internal format to glTexImage2D, glTexImage3D, glCompressedTexImage2D, glCompressedTexImage3D, glTexStorage2D, glTexStorage3D
//
// 8 bits per component
//
#if !defined( GL_R8 )
#define GL_R8 0x8229 // same as GL_R8_EXT
#endif
#if !defined( GL_RG8 )
#define GL_RG8 0x822B // same as GL_RG8_EXT
#endif
#if !defined( GL_RGB8 )
#define GL_RGB8 0x8051 // same as GL_RGB8_EXT and GL_RGB8_OES
#endif
#if !defined( GL_RGBA8 )
#define GL_RGBA8 0x8058 // same as GL_RGBA8_EXT and GL_RGBA8_OES
#endif
#if !defined( GL_R8_SNORM )
#define GL_R8_SNORM 0x8F94
#endif
#if !defined( GL_RG8_SNORM )
#define GL_RG8_SNORM 0x8F95
#endif
#if !defined( GL_RGB8_SNORM )
#define GL_RGB8_SNORM 0x8F96
#endif
#if !defined( GL_RGBA8_SNORM )
#define GL_RGBA8_SNORM 0x8F97
#endif
#if !defined( GL_R8UI )
#define GL_R8UI 0x8232
#endif
#if !defined( GL_RG8UI )
#define GL_RG8UI 0x8238
#endif
#if !defined( GL_RGB8UI )
#define GL_RGB8UI 0x8D7D // same as GL_RGB8UI_EXT
#endif
#if !defined( GL_RGBA8UI )
#define GL_RGBA8UI 0x8D7C // same as GL_RGBA8UI_EXT
#endif
#if !defined( GL_R8I )
#define GL_R8I 0x8231
#endif
#if !defined( GL_RG8I )
#define GL_RG8I 0x8237
#endif
#if !defined( GL_RGB8I )
#define GL_RGB8I 0x8D8F // same as GL_RGB8I_EXT
#endif
#if !defined( GL_RGBA8I )
#define GL_RGBA8I 0x8D8E // same as GL_RGBA8I_EXT
#endif
#if !defined( GL_SR8 )
#define GL_SR8 0x8FBD // same as GL_SR8_EXT
#endif
#if !defined( GL_SRG8 )
#define GL_SRG8 0x8FBE // same as GL_SRG8_EXT
#endif
#if !defined( GL_SRGB8 )
#define GL_SRGB8 0x8C41 // same as GL_SRGB8_EXT
#endif
#if !defined( GL_SRGB8_ALPHA8 )
#define GL_SRGB8_ALPHA8 0x8C43 // same as GL_SRGB8_ALPHA8_EXT
#endif
//
// 16 bits per component
//
#if !defined( GL_R16 )
#define GL_R16 0x822A // same as GL_R16_EXT
#endif
#if !defined( GL_RG16 )
#define GL_RG16 0x822C // same as GL_RG16_EXT
#endif
#if !defined( GL_RGB16 )
#define GL_RGB16 0x8054 // same as GL_RGB16_EXT
#endif
#if !defined( GL_RGBA16 )
#define GL_RGBA16 0x805B // same as GL_RGBA16_EXT
#endif
#if !defined( GL_R16_SNORM )
#define GL_R16_SNORM 0x8F98 // same as GL_R16_SNORM_EXT
#endif
#if !defined( GL_RG16_SNORM )
#define GL_RG16_SNORM 0x8F99 // same as GL_RG16_SNORM_EXT
#endif
#if !defined( GL_RGB16_SNORM )
#define GL_RGB16_SNORM 0x8F9A // same as GL_RGB16_SNORM_EXT
#endif
#if !defined( GL_RGBA16_SNORM )
#define GL_RGBA16_SNORM 0x8F9B // same as GL_RGBA16_SNORM_EXT
#endif
#if !defined( GL_R16UI )
#define GL_R16UI 0x8234
#endif
#if !defined( GL_RG16UI )
#define GL_RG16UI 0x823A
#endif
#if !defined( GL_RGB16UI )
#define GL_RGB16UI 0x8D77 // same as GL_RGB16UI_EXT
#endif
#if !defined( GL_RGBA16UI )
#define GL_RGBA16UI 0x8D76 // same as GL_RGBA16UI_EXT
#endif
#if !defined( GL_R16I )
#define GL_R16I 0x8233
#endif
#if !defined( GL_RG16I )
#define GL_RG16I 0x8239
#endif
#if !defined( GL_RGB16I )
#define GL_RGB16I 0x8D89 // same as GL_RGB16I_EXT
#endif
#if !defined( GL_RGBA16I )
#define GL_RGBA16I 0x8D88 // same as GL_RGBA16I_EXT
#endif
#if !defined( GL_R16F )
#define GL_R16F 0x822D // same as GL_R16F_EXT
#endif
#if !defined( GL_RG16F )
#define GL_RG16F 0x822F // same as GL_RG16F_EXT
#endif
#if !defined( GL_RGB16F )
#define GL_RGB16F 0x881B // same as GL_RGB16F_EXT and GL_RGB16F_ARB
#endif
#if !defined( GL_RGBA16F )
#define GL_RGBA16F 0x881A // sama as GL_RGBA16F_EXT and GL_RGBA16F_ARB
#endif
//
// 32 bits per component
//
#if !defined( GL_R32UI )
#define GL_R32UI 0x8236
#endif
#if !defined( GL_RG32UI )
#define GL_RG32UI 0x823C
#endif
#if !defined( GL_RGB32UI )
#define GL_RGB32UI 0x8D71 // same as GL_RGB32UI_EXT
#endif
#if !defined( GL_RGBA32UI )
#define GL_RGBA32UI 0x8D70 // same as GL_RGBA32UI_EXT
#endif
#if !defined( GL_R32I )
#define GL_R32I 0x8235
#endif
#if !defined( GL_RG32I )
#define GL_RG32I 0x823B
#endif
#if !defined( GL_RGB32I )
#define GL_RGB32I 0x8D83 // same as GL_RGB32I_EXT
#endif
#if !defined( GL_RGBA32I )
#define GL_RGBA32I 0x8D82 // same as GL_RGBA32I_EXT
#endif
#if !defined( GL_R32F )
#define GL_R32F 0x822E // same as GL_R32F_EXT
#endif
#if !defined( GL_RG32F )
#define GL_RG32F 0x8230 // same as GL_RG32F_EXT
#endif
#if !defined( GL_RGB32F )
#define GL_RGB32F 0x8815 // same as GL_RGB32F_EXT and GL_RGB32F_ARB
#endif
#if !defined( GL_RGBA32F )
#define GL_RGBA32F 0x8814 // same as GL_RGBA32F_EXT and GL_RGBA32F_ARB
#endif
//
// Packed
//
#if !defined( GL_R3_G3_B2 )
#define GL_R3_G3_B2 0x2A10
#endif
#if !defined( GL_RGB4 )
#define GL_RGB4 0x804F // same as GL_RGB4_EXT
#endif
#if !defined( GL_RGB5 )
#define GL_RGB5 0x8050 // same as GL_RGB5_EXT
#endif
#if !defined( GL_RGB565 )
#define GL_RGB565 0x8D62 // same as GL_RGB565_EXT and GL_RGB565_OES
#endif
#if !defined( GL_RGB10 )
#define GL_RGB10 0x8052 // same as GL_RGB10_EXT
#endif
#if !defined( GL_RGB12 )
#define GL_RGB12 0x8053 // same as GL_RGB12_EXT
#endif
#if !defined( GL_RGBA2 )
#define GL_RGBA2 0x8055 // same as GL_RGBA2_EXT
#endif
#if !defined( GL_RGBA4 )
#define GL_RGBA4 0x8056 // same as GL_RGBA4_EXT and GL_RGBA4_OES
#endif
#if !defined( GL_RGBA12 )
#define GL_RGBA12 0x805A // same as GL_RGBA12_EXT
#endif
#if !defined( GL_RGB5_A1 )
#define GL_RGB5_A1 0x8057 // same as GL_RGB5_A1_EXT and GL_RGB5_A1_OES
#endif
#if !defined( GL_RGB10_A2 )
#define GL_RGB10_A2 0x8059 // same as GL_RGB10_A2_EXT
#endif
#if !defined( GL_RGB10_A2UI )
#define GL_RGB10_A2UI 0x906F
#endif
#if !defined( GL_R11F_G11F_B10F )
#define GL_R11F_G11F_B10F 0x8C3A // same as GL_R11F_G11F_B10F_APPLE and GL_R11F_G11F_B10F_EXT
#endif
#if !defined( GL_RGB9_E5 )
#define GL_RGB9_E5 0x8C3D // same as GL_RGB9_E5_APPLE and GL_RGB9_E5_EXT
#endif
#if !defined( GL_COMPRESSED_RG )
#define GL_COMPRESSED_RG 0x8226
#endif
#if !defined( GL_COMPRESSED_RGB )
#define GL_COMPRESSED_RGB 0x84ED // same as GL_COMPRESSED_RGB_ARB
#endif
#if !defined( GL_COMPRESSED_RGBA )
#define GL_COMPRESSED_RGBA 0x84EE // same as GL_COMPRESSED_RGBA_ARB
#endif
#if !defined( GL_COMPRESSED_SRGB )
#define GL_COMPRESSED_SRGB 0x8C48 // same as GL_COMPRESSED_SRGB_EXT
#endif
#if !defined( GL_COMPRESSED_SRGB_ALPHA )
#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 // same as GL_COMPRESSED_SRGB_ALPHA_EXT
#endif
S3TC/DXT/BC
//
#if !defined( GL_COMPRESSED_RGB_S3TC_DXT1_EXT )
#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
#endif
#if !defined( GL_COMPRESSED_RGBA_S3TC_DXT1_EXT )
#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
#endif
#if !defined( GL_COMPRESSED_RGBA_S3TC_DXT3_EXT )
#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
#endif
#if !defined( GL_COMPRESSED_RGBA_S3TC_DXT5_EXT )
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
#endif
#if !defined( GL_COMPRESSED_SRGB_S3TC_DXT1_EXT )
#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
#endif
#if !defined( GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT )
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
#endif
#if !defined( GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT )
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
#endif
#if !defined( GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT )
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
#endif
#if !defined( GL_COMPRESSED_LUMINANCE_LATC1_EXT )
#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
#endif
#if !defined( GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT )
#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
#endif
#if !defined( GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT )
#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
#endif
#if !defined( GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT )
#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
#endif
#if !defined( GL_COMPRESSED_RED_RGTC1 )
#define GL_COMPRESSED_RED_RGTC1 0x8DBB // same as GL_COMPRESSED_RED_RGTC1_EXT
#endif
#if !defined( GL_COMPRESSED_RG_RGTC2 )
#define GL_COMPRESSED_RG_RGTC2 0x8DBD // same as GL_COMPRESSED_RG_RGTC2_EXT
#endif
#if !defined( GL_COMPRESSED_SIGNED_RED_RGTC1 )
#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC // same as GL_COMPRESSED_SIGNED_RED_RGTC1_EXT
#endif
#if !defined( GL_COMPRESSED_SIGNED_RG_RGTC2 )
#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE // same as GL_COMPRESSED_SIGNED_RG_RGTC2_EXT
#endif
#if !defined( GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT )
#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E // same as GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB
#endif
#if !defined( GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT )
#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F // same as GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB
#endif
#if !defined( GL_COMPRESSED_RGBA_BPTC_UNORM )
#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C // same as GL_COMPRESSED_RGBA_BPTC_UNORM_ARB
#endif
#if !defined( GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM )
#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D // same as GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB
#endif
//
// ETC
//
#if !defined( GL_ETC1_RGB8_OES )
#define GL_ETC1_RGB8_OES 0x8D64
#endif
#if !defined( GL_COMPRESSED_RGB8_ETC2 )
#define GL_COMPRESSED_RGB8_ETC2 0x9274
#endif
#if !defined( GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 )
#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
#endif
#if !defined( GL_COMPRESSED_RGBA8_ETC2_EAC )
#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
#endif
#if !defined( GL_COMPRESSED_SRGB8_ETC2 )
#define GL_COMPRESSED_SRGB8_ETC2 0x9275
#endif
#if !defined( GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 )
#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
#endif
#if !defined( GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC )
#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
#endif
#if !defined( GL_COMPRESSED_R11_EAC )
#define GL_COMPRESSED_R11_EAC 0x9270
#endif
#if !defined( GL_COMPRESSED_RG11_EAC )
#define GL_COMPRESSED_RG11_EAC 0x9272
#endif
#if !defined( GL_COMPRESSED_SIGNED_R11_EAC )
#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
#endif
#if !defined( GL_COMPRESSED_SIGNED_RG11_EAC )
#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
#endif
//
// PVRTC
//
#if !defined( GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG )
#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
#endif
#if !defined( GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG )
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137
#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138
#endif
#if !defined( GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT )
#define GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54
#define GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55
#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56
#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57
#endif
#if !defined( GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG )
#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0
#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1
#endif
//
// ASTC
//
#if !defined( GL_COMPRESSED_RGBA_ASTC_4x4_KHR )
#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
#endif
#if !defined( GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR )
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
#endif
#if !defined( GL_COMPRESSED_RGBA_ASTC_3x3x3_OES )
#define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0
#define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1
#define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2
#define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3
#define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4
#define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5
#define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6
#define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7
#define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8
#define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9
#endif
#if !defined( GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES )
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9
#endif
//
// ATC
//
#if !defined( GL_ATC_RGB_AMD )
#define GL_ATC_RGB_AMD 0x8C92
#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
#endif
//
// Palletized (combined palette)
//
#if !defined( GL_PALETTE4_RGB8_OES )
#define GL_PALETTE4_RGB8_OES 0x8B90
#define GL_PALETTE4_RGBA8_OES 0x8B91
#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
#define GL_PALETTE4_RGBA4_OES 0x8B93
#define GL_PALETTE4_RGB5_A1_OES 0x8B94
#define GL_PALETTE8_RGB8_OES 0x8B95
#define GL_PALETTE8_RGBA8_OES 0x8B96
#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
#define GL_PALETTE8_RGBA4_OES 0x8B98
#define GL_PALETTE8_RGB5_A1_OES 0x8B99
Depth/stencil
//
#if !defined( GL_DEPTH_COMPONENT16 )
#define GL_DEPTH_COMPONENT16 0x81A5 // same as GL_DEPTH_COMPONENT16_SGIX and GL_DEPTH_COMPONENT16_ARB
#endif
#if !defined( GL_DEPTH_COMPONENT24 )
#define GL_DEPTH_COMPONENT24 0x81A6 // same as GL_DEPTH_COMPONENT24_SGIX and GL_DEPTH_COMPONENT24_ARB
#endif
#if !defined( GL_DEPTH_COMPONENT32 )
#define GL_DEPTH_COMPONENT32 0x81A7 // same as GL_DEPTH_COMPONENT32_SGIX and GL_DEPTH_COMPONENT32_ARB and GL_DEPTH_COMPONENT32_OES
#endif
#if !defined( GL_DEPTH_COMPONENT32F )
#define GL_DEPTH_COMPONENT32F 0x8CAC // same as GL_DEPTH_COMPONENT32F_ARB
#endif
#if !defined( GL_DEPTH_COMPONENT32F_NV )
#define GL_DEPTH_COMPONENT32F_NV 0x8DAB // note that this is different from GL_DEPTH_COMPONENT32F
#endif
#if !defined( GL_STENCIL_INDEX1 )
#define GL_STENCIL_INDEX1 0x8D46 // same as GL_STENCIL_INDEX1_EXT
#endif
#if !defined( GL_STENCIL_INDEX4 )
#define GL_STENCIL_INDEX4 0x8D47 // same as GL_STENCIL_INDEX4_EXT
#endif
#if !defined( GL_STENCIL_INDEX8 )
#define GL_STENCIL_INDEX8 0x8D48 // same as GL_STENCIL_INDEX8_EXT
#endif
#if !defined( GL_STENCIL_INDEX16 )
#define GL_STENCIL_INDEX16 0x8D49 // same as GL_STENCIL_INDEX16_EXT
#endif
#if !defined( GL_DEPTH24_STENCIL8 )
#define GL_DEPTH24_STENCIL8 0x88F0 // same as GL_DEPTH24_STENCIL8_EXT and GL_DEPTH24_STENCIL8_OES
#endif
#if !defined( GL_DEPTH32F_STENCIL8 )
#define GL_DEPTH32F_STENCIL8 0x8CAD // same as GL_DEPTH32F_STENCIL8_ARB
#endif
#if !defined( GL_DEPTH32F_STENCIL8_NV )
#define GL_DEPTH32F_STENCIL8_NV 0x8DAC // note that this is different from GL_DEPTH32F_STENCIL8
]#
# How to add a currently unhandled format:
#1. echo KtxTexture.glInternalformat
#2. convert the value to hex
#3. ctrl-f the hex value for the matching GL_XXXXX
#.4. Find the original case block of the match in the C `glGetFormatSize` (bottom of file)
proc aformatSize*( format: GlFormats, pFormatSize: var GlFormatSize ) =
case format
of GL_RGBA8:
pFormatSize.flags = 0
pFormatSize.paletteSizeInBits = 0
pFormatSize.blockSizeInBits = 4 * 8
pFormatSize.blockWidth = 1
pFormatSize.blockHeight = 1
pFormatSize.blockDepth = 1
# of GL_R8 or GL_R8_SNORM or GL_R8UI or GL_R8I:
# pFormatSize.flags = 0
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 1 * 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RG8 or GL_RG8_SNORM:# or GL_RG8UI:# or GL_RG8I:# or GL_SRG8:
# pFormatSize.flags = 0
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 2 * 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGB8 or GL_RGB8_SNORM or GL_RGB8UI or GL_RGB8I or GL_SRGB8:
# pFormatSize.flags = 0
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 3 * 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_R16 or GL_R16_SNORM or GL_R16UI or GL_R16I or GL_R16F:
# pFormatSize.flags = 0
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 2 * 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RG16 or GL_RG16_SNORM or GL_RG16UI or GL_RG16I or GL_RG16F :
# pFormatSize.flags = 0
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 4 * 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGB16 or GL_RGB16_SNORM or GL_RGB16UI or GL_RGB16I or GL_RGB16F:
# pFormatSize.flags = 0
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 6 * 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGBA16 or GL_RGBA16_SNORM or GL_RGBA16UI or GL_RGBA16I or GL_RGBA16F:
# pFormatSize.flags = 0
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 8 * 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_R32UI or GL_R32I or GL_R32F:
# pFormatSize.flags = 0
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 4 * 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RG32UI or GL_RG32I or GL_RG32F:
# pFormatSize.flags = 0
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 8 * 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGB32UI or GL_RGB32I or GL_RGB32F:
# pFormatSize.flags = 0
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 12 * 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGBA32UI or GL_RGBA32I or GL_RGBA32F :
# pFormatSize.flags = 0
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 16 * 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# # Packed
# of GL_R3_G3_B2: # 3-component 3:3:2, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGB4: # 3-component 4:4:4, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 12
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGB5: # 3-component 5:5:5, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 16
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGB565: # 3-component 5:6:5, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 16
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGB10: # 3-component 10:10:10, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 32
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGB12: # 3-component 12:12:12, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 36
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGBA2: # 4-component 2:2:2:2, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGBA4: # 4-component 4:4:4:4, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 16
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGBA12: # 4-component 12:12:12:12, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 48
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGB5_A1: # 4-component 5:5:5:1, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 32
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGB10_A2: # 4-component 10:10:10:2, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 32
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_RGB10_A2UI: # 4-component 10:10:10:2, unsigned integer
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 32
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_R11F_G11F_B10F or GL_RGB9_E5:
# pFormatSize.flags = GL_FORMAT_SIZE_PACKED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 32
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_COMPRESSED_RGB_S3TC_DXT1_EXT or GL_COMPRESSED_RGBA_S3TC_DXT1_EXT or GL_COMPRESSED_SRGB_S3TC_DXT1_EXT or GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 64
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# of GL_COMPRESSED_RGBA_S3TC_DXT5_EXT or GL_COMPRESSED_RGBA_S3TC_DXT3_EXT or GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT or GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# of GL_COMPRESSED_LUMINANCE_LATC1_EXT or GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 64
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# of GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT or GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# of GL_COMPRESSED_RED_RGTC1 or GL_COMPRESSED_SIGNED_RED_RGTC1:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 64
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# of GL_COMPRESSED_RG_RGTC2 or GL_COMPRESSED_SIGNED_RG_RGTC2:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# of GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT or GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT or GL_COMPRESSED_RGBA_BPTC_UNORM or GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# of GL_ETC1_RGB8_OES or GL_COMPRESSED_RGB8_ETC2 or GL_COMPRESSED_SRGB8_ETC2 or GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 or GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 64
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# of GL_COMPRESSED_RGBA8_ETC2_EAC or GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# of GL_COMPRESSED_R11_EAC or GL_COMPRESSED_SIGNED_R11_EAC:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 64
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# of GL_COMPRESSED_RG11_EAC or GL_COMPRESSED_SIGNED_RG11_EAC:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# # PVRTC
# # 3-component PVRTC, 16x8 blocks, unsigned normalized
# # 3-component PVRTC, 16x8 blocks, sRGB
# # 4-component PVRTC, 16x8 blocks, unsigned normalized
# # 4-component PVRTC, 16x8 blocks, sRGB
# of GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG or GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT or GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG or GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 64
# pFormatSize.blockWidth = 16
# pFormatSize.blockHeight = 8
# pFormatSize.blockDepth = 1
# # 3-component PVRTC, 8x8 blocks, unsigned normalized
# # 3-component PVRTC, 8x8 blocks, sRGB
# # 4-component PVRTC, 8x8 blocks, unsigned normalized
# # 4-component PVRTC, 8x8 blocks, sRGB
# of GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG or GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT or GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG or GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 64
# pFormatSize.blockWidth = 8
# pFormatSize.blockHeight = 8
# pFormatSize.blockDepth = 1
# # 4-component PVRTC, 8x4 blocks, unsigned normalized
# # 4-component PVRTC, 8x4 blocks, sRGB
# of GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG or GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 64
# pFormatSize.blockWidth = 8
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# # 4-component PVRTC, 4x4 blocks, unsigned normalized
# # 4-component PVRTC, 4x4 blocks, sRGB
# of GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG or GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 64
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# # ASTC
# # 4-component ASTC, 4x4 blocks, unsigned normalized
# # 4-component ASTC, 4x4 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_4x4_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 5x4 blocks, unsigned normalized
# # 4-component ASTC, 5x4 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_5x4_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 5
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 5x5 blocks, unsigned normalized
# # 4-component ASTC, 5x5 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_5x5_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 5
# pFormatSize.blockHeight = 5
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 6x5 blocks, unsigned normalized
# # 4-component ASTC, 6x5 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_6x5_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 6
# pFormatSize.blockHeight = 5
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 6x6 blocks, unsigned normalized
# # 4-component ASTC, 6x6 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_6x6_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 6
# pFormatSize.blockHeight = 6
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 8x5 blocks, unsigned normalized
# # 4-component ASTC, 8x5 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_8x5_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 8
# pFormatSize.blockHeight = 5
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 8x6 blocks, unsigned normalized
# # 4-component ASTC, 8x6 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_8x6_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 8
# pFormatSize.blockHeight = 6
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 8x8 blocks, unsigned normalized
# # 4-component ASTC, 8x8 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_8x8_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 8
# pFormatSize.blockHeight = 8
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 10x5 blocks, unsigned normalized
# # 4-component ASTC, 10x5 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_10x5_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 10
# pFormatSize.blockHeight = 5
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 10x6 blocks, unsigned normalized
# # 4-component ASTC, 10x6 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_10x6_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 10
# pFormatSize.blockHeight = 6
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 10x8 blocks, unsigned normalized
# # 4-component ASTC, 10x8 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_10x8_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 10
# pFormatSize.blockHeight = 8
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 10x10 blocks, unsigned normalized
# # 4-component ASTC, 10x10 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_10x10_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 10
# pFormatSize.blockHeight = 10
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 12x10 blocks, unsigned normalized
# # 4-component ASTC, 12x10 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_12x10_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 12
# pFormatSize.blockHeight = 10
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 12x12 blocks, unsigned normalized
# # 4-component ASTC, 12x12 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_12x12_KHR or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 12
# pFormatSize.blockHeight = 12
# pFormatSize.blockDepth = 1
# # 4-component ASTC, 3x3x3 blocks, unsigned normalized
# # 4-component ASTC, 3x3x3 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_3x3x3_OES or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 3
# pFormatSize.blockHeight = 3
# pFormatSize.blockDepth = 3
# # 4-component ASTC, 4x3x3 blocks, unsigned normalized
# # 4-component ASTC, 4x3x3 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_4x3x3_OES or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 3
# pFormatSize.blockDepth = 3
# # 4-component ASTC, 4x4x3 blocks, unsigned normalized
# # 4-component ASTC, 4x4x3 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_4x4x3_OES or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 3
# # 4-component ASTC, 4x4x4 blocks, unsigned normalized
# # 4-component ASTC, 4x4x4 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_4x4x4_OES or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 4
# # 4-component ASTC, 5x4x4 blocks, unsigned normalized
# # 4-component ASTC, 5x4x4 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_5x4x4_OES or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 5
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 4
# # 4-component ASTC, 5x5x4 blocks, unsigned normalized
# # 4-component ASTC, 5x5x4 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_5x5x4_OES or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 5
# pFormatSize.blockHeight = 5
# pFormatSize.blockDepth = 4
# # 4-component ASTC, 5x5x5 blocks, unsigned normalized
# # 4-component ASTC, 5x5x5 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_5x5x5_OES or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 5
# pFormatSize.blockHeight = 5
# pFormatSize.blockDepth = 5
# # 4-component ASTC, 6x5x5 blocks, unsigned normalized
# # 4-component ASTC, 6x5x5 blocks, sRGB:
# of GL_COMPRESSED_RGBA_ASTC_6x5x5_OES or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 6
# pFormatSize.blockHeight = 5
# pFormatSize.blockDepth = 5
# # 4-component ASTC, 6x6x5 blocks, unsigned normalized
# # 4-component ASTC, 6x6x5 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_6x6x5_OES or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 6
# pFormatSize.blockHeight = 6
# pFormatSize.blockDepth = 5
# # 4-component ASTC, 6x6x6 blocks, unsigned normalized
# # 4-component ASTC, 6x6x6 blocks, sRGB
# of GL_COMPRESSED_RGBA_ASTC_6x6x6_OES or GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES :
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 6
# pFormatSize.blockHeight = 6
# pFormatSize.blockDepth = 6
# # ATC
# of GL_ATC_RGB_AMD: # 3-component, 4x4 blocks, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 64
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# # 4-component, 4x4 blocks, unsigned normalized
# # 4-component, 4x4 blocks, unsigned normalized
# of GL_ATC_RGBA_EXPLICIT_ALPHA_AMD or GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD:
# pFormatSize.flags = GL_FORMAT_SIZE_COMPRESSED_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 128
# pFormatSize.blockWidth = 4
# pFormatSize.blockHeight = 4
# pFormatSize.blockDepth = 1
# # Palletized
# of GL_PALETTE4_RGB8_OES: # 3-component 8:8:8, 4-bit palette, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PALETTIZED_BIT
# pFormatSize.paletteSizeInBits = 16 * 24
# pFormatSize.blockSizeInBits = 4
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_PALETTE4_RGBA8_OES: # 4-component 8:8:8:8, 4-bit palette, unsigned normalized
# pFormatSize.flags = GL_FORMAT_SIZE_PALETTIZED_BIT
# pFormatSize.paletteSizeInBits = 16 * 32
# pFormatSize.blockSizeInBits = 4
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# # 3-component 5:6:5, 4-bit palette, unsigned normalized
# # 4-component 4:4:4:4, 4-bit palette, unsigned normalized
# # 4-component 5:5:5:1, 4-bit palette, unsigned normalized
# of GL_PALETTE4_R5_G6_B5_OES or GL_PALETTE4_RGBA4_OES or GL_PALETTE4_RGB5_A1_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_PALETTIZED_BIT
# pFormatSize.paletteSizeInBits = 16 * 16
# pFormatSize.blockSizeInBits = 4
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# # 3-component 8:8:8, 8-bit palette, unsigned normalized
# of GL_PALETTE8_RGB8_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_PALETTIZED_BIT
# pFormatSize.paletteSizeInBits = 256 * 24
# pFormatSize.blockSizeInBits = 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# # 4-component 8:8:8:8, 8-bit palette, unsigned normalized
# of GL_PALETTE8_RGBA8_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_PALETTIZED_BIT
# pFormatSize.paletteSizeInBits = 256 * 32
# pFormatSize.blockSizeInBits = 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# # 3-component 5:6:5, 8-bit palette, unsigned normalized
# # 4-component 4:4:4:4, 8-bit palette, unsigned normalized
# # 4-component 5:5:5:1, 8-bit palette, unsigned normalized
# of GL_PALETTE8_R5_G6_B5_OES or GL_PALETTE8_RGBA4_OES or GL_PALETTE8_RGB5_A1_OES:
# pFormatSize.flags = GL_FORMAT_SIZE_PALETTIZED_BIT
# pFormatSize.paletteSizeInBits = 256 * 16
# pFormatSize.blockSizeInBits = 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# # Depth/stencil
# of GL_DEPTH_COMPONENT16:
# pFormatSize.flags = GL_FORMAT_SIZE_DEPTH_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 16
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_DEPTH_COMPONENT24 or GL_DEPTH_COMPONENT32 or GL_DEPTH_COMPONENT32F or GL_DEPTH_COMPONENT32F_NV:
# pFormatSize.flags = GL_FORMAT_SIZE_DEPTH_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 32
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_STENCIL_INDEX1:
# pFormatSize.flags = GL_FORMAT_SIZE_STENCIL_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 1
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_STENCIL_INDEX4:
# pFormatSize.flags = GL_FORMAT_SIZE_STENCIL_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 4
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_STENCIL_INDEX8:
# pFormatSize.flags = GL_FORMAT_SIZE_STENCIL_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_STENCIL_INDEX16:
# pFormatSize.flags = GL_FORMAT_SIZE_STENCIL_BIT
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 16
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_DEPTH24_STENCIL8:
# pFormatSize.flags = bitor(GL_FORMAT_SIZE_DEPTH_BIT, GL_FORMAT_SIZE_STENCIL_BIT)
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 32
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# of GL_DEPTH32F_STENCIL8 or GL_DEPTH32F_STENCIL8_NV:
# pFormatSize.flags = bitor(GL_FORMAT_SIZE_DEPTH_BIT, GL_FORMAT_SIZE_STENCIL_BIT)
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 64
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# else:
# pFormatSize.flags = 0
# pFormatSize.paletteSizeInBits = 0
# pFormatSize.blockSizeInBits = 8
# pFormatSize.blockWidth = 1
# pFormatSize.blockHeight = 1
# pFormatSize.blockDepth = 1
# until we know for """sure""" the glGetFormatSize port is correct
#[
static inline void glGetFormatSize( const GLenum internalFormat, GlFormatSize * pFormatSize )
{
switch ( internalFormat )
{
//
// 8 bits per component
//
case GL_R8: // 1-component, 8-bit unsigned normalized
case GL_R8_SNORM: // 1-component, 8-bit signed normalized
case GL_R8UI: // 1-component, 8-bit unsigned integer
case GL_R8I: // 1-component, 8-bit signed integer
case GL_SR8: // 1-component, 8-bit sRGB
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 1 * 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RG8: // 2-component, 8-bit unsigned normalized
case GL_RG8_SNORM: // 2-component, 8-bit signed normalized
case GL_RG8UI: // 2-component, 8-bit unsigned integer
case GL_RG8I: // 2-component, 8-bit signed integer
case GL_SRG8: // 2-component, 8-bit sRGB
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 2 * 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGB8: // 3-component, 8-bit unsigned normalized
case GL_RGB8_SNORM: // 3-component, 8-bit signed normalized
case GL_RGB8UI: // 3-component, 8-bit unsigned integer
case GL_RGB8I: // 3-component, 8-bit signed integer
case GL_SRGB8: // 3-component, 8-bit sRGB
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 3 * 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGBA8: // 4-component, 8-bit unsigned normalized
case GL_RGBA8_SNORM: // 4-component, 8-bit signed normalized
case GL_RGBA8UI: // 4-component, 8-bit unsigned integer
case GL_RGBA8I: // 4-component, 8-bit signed integer
case GL_SRGB8_ALPHA8: // 4-component, 8-bit sRGB
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 4 * 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
//
// 16 bits per component
//
case GL_R16: // 1-component, 16-bit unsigned normalized
case GL_R16_SNORM: // 1-component, 16-bit signed normalized
case GL_R16UI: // 1-component, 16-bit unsigned integer
case GL_R16I: // 1-component, 16-bit signed integer
case GL_R16F: // 1-component, 16-bit floating-point
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 2 * 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RG16: // 2-component, 16-bit unsigned normalized
case GL_RG16_SNORM: // 2-component, 16-bit signed normalized
case GL_RG16UI: // 2-component, 16-bit unsigned integer
case GL_RG16I: // 2-component, 16-bit signed integer
case GL_RG16F: // 2-component, 16-bit floating-point
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 4 * 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGB16: // 3-component, 16-bit unsigned normalized
case GL_RGB16_SNORM: // 3-component, 16-bit signed normalized
case GL_RGB16UI: // 3-component, 16-bit unsigned integer
case GL_RGB16I: // 3-component, 16-bit signed integer
case GL_RGB16F: // 3-component, 16-bit floating-point
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 6 * 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGBA16: // 4-component, 16-bit unsigned normalized
case GL_RGBA16_SNORM: // 4-component, 16-bit signed normalized
case GL_RGBA16UI: // 4-component, 16-bit unsigned integer
case GL_RGBA16I: // 4-component, 16-bit signed integer
case GL_RGBA16F: // 4-component, 16-bit floating-point
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 8 * 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
//
// 32 bits per component
//
case GL_R32UI: // 1-component, 32-bit unsigned integer
case GL_R32I: // 1-component, 32-bit signed integer
case GL_R32F: // 1-component, 32-bit floating-point
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 4 * 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RG32UI: // 2-component, 32-bit unsigned integer
case GL_RG32I: // 2-component, 32-bit signed integer
case GL_RG32F: // 2-component, 32-bit floating-point
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 8 * 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGB32UI: // 3-component, 32-bit unsigned integer
case GL_RGB32I: // 3-component, 32-bit signed integer
case GL_RGB32F: // 3-component, 32-bit floating-point
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 12 * 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGBA32UI: // 4-component, 32-bit unsigned integer
case GL_RGBA32I: // 4-component, 32-bit signed integer
case GL_RGBA32F: // 4-component, 32-bit floating-point
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 16 * 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
//
// Packed
//
case GL_R3_G3_B2: // 3-component 3:3:2, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGB4: // 3-component 4:4:4, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 12;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGB5: // 3-component 5:5:5, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 16;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGB565: // 3-component 5:6:5, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 16;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGB10: // 3-component 10:10:10, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 32;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGB12: // 3-component 12:12:12, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 36;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGBA2: // 4-component 2:2:2:2, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGBA4: // 4-component 4:4:4:4, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 16;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGBA12: // 4-component 12:12:12:12, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 48;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGB5_A1: // 4-component 5:5:5:1, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 32;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGB10_A2: // 4-component 10:10:10:2, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 32;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_RGB10_A2UI: // 4-component 10:10:10:2, unsigned integer
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 32;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_R11F_G11F_B10F: // 3-component 11:11:10, floating-point
case GL_RGB9_E5: // 3-component/exp 9:9:9/5, floating-point
pFormatSize->flags = GL_FORMAT_SIZE_PACKED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 32;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
//
// S3TC/DXT/BC
//
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: // line through 3D space, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: // line through 3D space plus 1-bit alpha, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT: // line through 3D space, 4x4 blocks, sRGB
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: // line through 3D space plus 1-bit alpha, 4x4 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 64;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: // line through 3D space plus line through 1D space, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: // line through 3D space plus 4-bit alpha, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: // line through 3D space plus line through 1D space, 4x4 blocks, sRGB
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: // line through 3D space plus 4-bit alpha, 4x4 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_LUMINANCE_LATC1_EXT: // line through 1D space, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT: // line through 1D space, 4x4 blocks, signed normalized
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 64;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT: // two lines through 1D space, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT: // two lines through 1D space, 4x4 blocks, signed normalized
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RED_RGTC1: // line through 1D space, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SIGNED_RED_RGTC1: // line through 1D space, 4x4 blocks, signed normalized
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 64;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RG_RGTC2: // two lines through 1D space, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SIGNED_RG_RGTC2: // two lines through 1D space, 4x4 blocks, signed normalized
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT: // 3-component, 4x4 blocks, unsigned floating-point
case GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT: // 3-component, 4x4 blocks, signed floating-point
case GL_COMPRESSED_RGBA_BPTC_UNORM: // 4-component, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM: // 4-component, 4x4 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
//
// ETC
//
case GL_ETC1_RGB8_OES: // 3-component ETC1, 4x4 blocks, unsigned normalized" ),
case GL_COMPRESSED_RGB8_ETC2: // 3-component ETC2, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ETC2: // 3-component ETC2, 4x4 blocks, sRGB
case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: // 4-component ETC2 with 1-bit alpha, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: // 4-component ETC2 with 1-bit alpha, 4x4 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 64;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA8_ETC2_EAC: // 4-component ETC2, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: // 4-component ETC2, 4x4 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_R11_EAC: // 1-component ETC, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SIGNED_R11_EAC: // 1-component ETC, 4x4 blocks, signed normalized
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 64;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RG11_EAC: // 2-component ETC, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SIGNED_RG11_EAC: // 2-component ETC, 4x4 blocks, signed normalized
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
//
// PVRTC
//
case GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG: // 3-component PVRTC, 16x8 blocks, unsigned normalized
case GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT: // 3-component PVRTC, 16x8 blocks, sRGB
case GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: // 4-component PVRTC, 16x8 blocks, unsigned normalized
case GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT: // 4-component PVRTC, 16x8 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 64;
pFormatSize->blockWidth = 16;
pFormatSize->blockHeight = 8;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG: // 3-component PVRTC, 8x8 blocks, unsigned normalized
case GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT: // 3-component PVRTC, 8x8 blocks, sRGB
case GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: // 4-component PVRTC, 8x8 blocks, unsigned normalized
case GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT: // 4-component PVRTC, 8x8 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 64;
pFormatSize->blockWidth = 8;
pFormatSize->blockHeight = 8;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG: // 4-component PVRTC, 8x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG: // 4-component PVRTC, 8x4 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 64;
pFormatSize->blockWidth = 8;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG: // 4-component PVRTC, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG: // 4-component PVRTC, 4x4 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 64;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
//
// ASTC
//
case GL_COMPRESSED_RGBA_ASTC_4x4_KHR: // 4-component ASTC, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: // 4-component ASTC, 4x4 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_5x4_KHR: // 4-component ASTC, 5x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR: // 4-component ASTC, 5x4 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 5;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_5x5_KHR: // 4-component ASTC, 5x5 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR: // 4-component ASTC, 5x5 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 5;
pFormatSize->blockHeight = 5;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_6x5_KHR: // 4-component ASTC, 6x5 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR: // 4-component ASTC, 6x5 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 6;
pFormatSize->blockHeight = 5;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_6x6_KHR: // 4-component ASTC, 6x6 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR: // 4-component ASTC, 6x6 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 6;
pFormatSize->blockHeight = 6;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_8x5_KHR: // 4-component ASTC, 8x5 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR: // 4-component ASTC, 8x5 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 8;
pFormatSize->blockHeight = 5;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_8x6_KHR: // 4-component ASTC, 8x6 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR: // 4-component ASTC, 8x6 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 8;
pFormatSize->blockHeight = 6;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_8x8_KHR: // 4-component ASTC, 8x8 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: // 4-component ASTC, 8x8 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 8;
pFormatSize->blockHeight = 8;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_10x5_KHR: // 4-component ASTC, 10x5 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR: // 4-component ASTC, 10x5 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 10;
pFormatSize->blockHeight = 5;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_10x6_KHR: // 4-component ASTC, 10x6 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR: // 4-component ASTC, 10x6 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 10;
pFormatSize->blockHeight = 6;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_10x8_KHR: // 4-component ASTC, 10x8 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR: // 4-component ASTC, 10x8 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 10;
pFormatSize->blockHeight = 8;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_10x10_KHR: // 4-component ASTC, 10x10 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: // 4-component ASTC, 10x10 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 10;
pFormatSize->blockHeight = 10;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_12x10_KHR: // 4-component ASTC, 12x10 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: // 4-component ASTC, 12x10 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 12;
pFormatSize->blockHeight = 10;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_12x12_KHR: // 4-component ASTC, 12x12 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: // 4-component ASTC, 12x12 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 12;
pFormatSize->blockHeight = 12;
pFormatSize->blockDepth = 1;
break;
case GL_COMPRESSED_RGBA_ASTC_3x3x3_OES: // 4-component ASTC, 3x3x3 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES: // 4-component ASTC, 3x3x3 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 3;
pFormatSize->blockHeight = 3;
pFormatSize->blockDepth = 3;
break;
case GL_COMPRESSED_RGBA_ASTC_4x3x3_OES: // 4-component ASTC, 4x3x3 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES: // 4-component ASTC, 4x3x3 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 3;
pFormatSize->blockDepth = 3;
break;
case GL_COMPRESSED_RGBA_ASTC_4x4x3_OES: // 4-component ASTC, 4x4x3 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES: // 4-component ASTC, 4x4x3 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 3;
break;
case GL_COMPRESSED_RGBA_ASTC_4x4x4_OES: // 4-component ASTC, 4x4x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES: // 4-component ASTC, 4x4x4 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 4;
break;
case GL_COMPRESSED_RGBA_ASTC_5x4x4_OES: // 4-component ASTC, 5x4x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES: // 4-component ASTC, 5x4x4 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 5;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 4;
break;
case GL_COMPRESSED_RGBA_ASTC_5x5x4_OES: // 4-component ASTC, 5x5x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES: // 4-component ASTC, 5x5x4 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 5;
pFormatSize->blockHeight = 5;
pFormatSize->blockDepth = 4;
break;
case GL_COMPRESSED_RGBA_ASTC_5x5x5_OES: // 4-component ASTC, 5x5x5 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES: // 4-component ASTC, 5x5x5 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 5;
pFormatSize->blockHeight = 5;
pFormatSize->blockDepth = 5;
break;
case GL_COMPRESSED_RGBA_ASTC_6x5x5_OES: // 4-component ASTC, 6x5x5 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES: // 4-component ASTC, 6x5x5 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 6;
pFormatSize->blockHeight = 5;
pFormatSize->blockDepth = 5;
break;
case GL_COMPRESSED_RGBA_ASTC_6x6x5_OES: // 4-component ASTC, 6x6x5 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES: // 4-component ASTC, 6x6x5 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 6;
pFormatSize->blockHeight = 6;
pFormatSize->blockDepth = 5;
break;
case GL_COMPRESSED_RGBA_ASTC_6x6x6_OES: // 4-component ASTC, 6x6x6 blocks, unsigned normalized
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES: // 4-component ASTC, 6x6x6 blocks, sRGB
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 6;
pFormatSize->blockHeight = 6;
pFormatSize->blockDepth = 6;
break;
//
// ATC
//
case GL_ATC_RGB_AMD: // 3-component, 4x4 blocks, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 64;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
case GL_ATC_RGBA_EXPLICIT_ALPHA_AMD: // 4-component, 4x4 blocks, unsigned normalized
case GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD: // 4-component, 4x4 blocks, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 128;
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
break;
//
// Palletized
//
case GL_PALETTE4_RGB8_OES: // 3-component 8:8:8, 4-bit palette, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PALETTIZED_BIT;
pFormatSize->paletteSizeInBits = 16 * 24;
pFormatSize->blockSizeInBits = 4;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_PALETTE4_RGBA8_OES: // 4-component 8:8:8:8, 4-bit palette, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PALETTIZED_BIT;
pFormatSize->paletteSizeInBits = 16 * 32;
pFormatSize->blockSizeInBits = 4;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_PALETTE4_R5_G6_B5_OES: // 3-component 5:6:5, 4-bit palette, unsigned normalized
case GL_PALETTE4_RGBA4_OES: // 4-component 4:4:4:4, 4-bit palette, unsigned normalized
case GL_PALETTE4_RGB5_A1_OES: // 4-component 5:5:5:1, 4-bit palette, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PALETTIZED_BIT;
pFormatSize->paletteSizeInBits = 16 * 16;
pFormatSize->blockSizeInBits = 4;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_PALETTE8_RGB8_OES: // 3-component 8:8:8, 8-bit palette, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PALETTIZED_BIT;
pFormatSize->paletteSizeInBits = 256 * 24;
pFormatSize->blockSizeInBits = 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_PALETTE8_RGBA8_OES: // 4-component 8:8:8:8, 8-bit palette, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PALETTIZED_BIT;
pFormatSize->paletteSizeInBits = 256 * 32;
pFormatSize->blockSizeInBits = 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_PALETTE8_R5_G6_B5_OES: // 3-component 5:6:5, 8-bit palette, unsigned normalized
case GL_PALETTE8_RGBA4_OES: // 4-component 4:4:4:4, 8-bit palette, unsigned normalized
case GL_PALETTE8_RGB5_A1_OES: // 4-component 5:5:5:1, 8-bit palette, unsigned normalized
pFormatSize->flags = GL_FORMAT_SIZE_PALETTIZED_BIT;
pFormatSize->paletteSizeInBits = 256 * 16;
pFormatSize->blockSizeInBits = 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
//
// Depth/stencil
//
case GL_DEPTH_COMPONENT16:
pFormatSize->flags = GL_FORMAT_SIZE_DEPTH_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 16;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32:
case GL_DEPTH_COMPONENT32F:
case GL_DEPTH_COMPONENT32F_NV:
pFormatSize->flags = GL_FORMAT_SIZE_DEPTH_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 32;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_STENCIL_INDEX1:
pFormatSize->flags = GL_FORMAT_SIZE_STENCIL_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 1;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_STENCIL_INDEX4:
pFormatSize->flags = GL_FORMAT_SIZE_STENCIL_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 4;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_STENCIL_INDEX8:
pFormatSize->flags = GL_FORMAT_SIZE_STENCIL_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_STENCIL_INDEX16:
pFormatSize->flags = GL_FORMAT_SIZE_STENCIL_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 16;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_DEPTH24_STENCIL8:
pFormatSize->flags = GL_FORMAT_SIZE_DEPTH_BIT | GL_FORMAT_SIZE_STENCIL_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 32;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
case GL_DEPTH32F_STENCIL8:
case GL_DEPTH32F_STENCIL8_NV:
pFormatSize->flags = GL_FORMAT_SIZE_DEPTH_BIT | GL_FORMAT_SIZE_STENCIL_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 64;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
default:
pFormatSize->flags = 0;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 8;
pFormatSize->blockWidth = 1;
pFormatSize->blockHeight = 1;
pFormatSize->blockDepth = 1;
break;
}
}
#endif // !GL_FORMAT_H
]#