mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Added BC6H and BC7 compressed formats.
This commit is contained in:
parent
8e3eaeaa23
commit
be4729940c
7 changed files with 44 additions and 0 deletions
|
@ -76,6 +76,8 @@ typedef enum bgfx_texture_format
|
|||
BGFX_TEXTURE_FORMAT_BC3,
|
||||
BGFX_TEXTURE_FORMAT_BC4,
|
||||
BGFX_TEXTURE_FORMAT_BC5,
|
||||
BGFX_TEXTURE_FORMAT_BC6H,
|
||||
BGFX_TEXTURE_FORMAT_BC7,
|
||||
BGFX_TEXTURE_FORMAT_ETC1,
|
||||
BGFX_TEXTURE_FORMAT_ETC2,
|
||||
BGFX_TEXTURE_FORMAT_ETC2A,
|
||||
|
|
|
@ -108,6 +108,8 @@ namespace bgfx
|
|||
BC3, // DXT5
|
||||
BC4, // LATC1/ATI1
|
||||
BC5, // LATC2/ATI2
|
||||
BC6H, // BC6H
|
||||
BC7, // BC7
|
||||
ETC1, // ETC1 RGB8
|
||||
ETC2, // ETC2 RGB8
|
||||
ETC2A, // ETC2 RGBA8
|
||||
|
|
|
@ -17,6 +17,8 @@ namespace bgfx
|
|||
{ 8, 4, 4, 16 }, // BC3
|
||||
{ 4, 4, 4, 8 }, // BC4
|
||||
{ 8, 4, 4, 16 }, // BC5
|
||||
{ 8, 4, 4, 16 }, // BC6H
|
||||
{ 8, 4, 4, 16 }, // BC7
|
||||
{ 4, 4, 4, 8 }, // ETC1
|
||||
{ 4, 4, 4, 8 }, // ETC2
|
||||
{ 8, 4, 4, 16 }, // ETC2A
|
||||
|
@ -66,6 +68,8 @@ namespace bgfx
|
|||
"BC3", // BC3
|
||||
"BC4", // BC4
|
||||
"BC5", // BC5
|
||||
"BC6H", // BC6H
|
||||
"BC7", // BC7
|
||||
"ETC1", // ETC1
|
||||
"ETC2", // ETC2
|
||||
"ETC2A", // ETC2A
|
||||
|
@ -1141,6 +1145,10 @@ namespace bgfx
|
|||
#define KTX_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
|
||||
#define KTX_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
|
||||
#define KTX_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
|
||||
#define KTX_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
|
||||
#define KTX_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D
|
||||
#define KTX_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E
|
||||
#define KTX_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F
|
||||
#define KTX_RGBA16 0x805B
|
||||
#define KTX_RGBA16F 0x881A
|
||||
|
||||
|
|
|
@ -204,6 +204,8 @@ namespace bgfx
|
|||
{ DXGI_FORMAT_BC3_UNORM, DXGI_FORMAT_BC3_UNORM, DXGI_FORMAT_UNKNOWN }, // BC3
|
||||
{ DXGI_FORMAT_BC4_UNORM, DXGI_FORMAT_BC4_UNORM, DXGI_FORMAT_UNKNOWN }, // BC4
|
||||
{ DXGI_FORMAT_BC5_UNORM, DXGI_FORMAT_BC5_UNORM, DXGI_FORMAT_UNKNOWN }, // BC5
|
||||
{ DXGI_FORMAT_BC6H_SF16, DXGI_FORMAT_BC6H_SF16, DXGI_FORMAT_UNKNOWN }, // BC6H
|
||||
{ DXGI_FORMAT_BC7_UNORM, DXGI_FORMAT_BC7_UNORM, DXGI_FORMAT_UNKNOWN }, // BC7
|
||||
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ETC1
|
||||
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ETC2
|
||||
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ETC2A
|
||||
|
|
|
@ -190,6 +190,8 @@ namespace bgfx
|
|||
{ D3DFMT_DXT5 }, // BC3
|
||||
{ D3DFMT_UNKNOWN }, // BC4
|
||||
{ D3DFMT_UNKNOWN }, // BC5
|
||||
{ D3DFMT_UNKNOWN }, // BC6H
|
||||
{ D3DFMT_UNKNOWN }, // BC7
|
||||
{ D3DFMT_UNKNOWN }, // ETC1
|
||||
{ D3DFMT_UNKNOWN }, // ETC2
|
||||
{ D3DFMT_UNKNOWN }, // ETC2A
|
||||
|
|
|
@ -183,6 +183,8 @@ namespace bgfx
|
|||
{ GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_ZERO, false }, // BC3
|
||||
{ GL_COMPRESSED_LUMINANCE_LATC1_EXT, GL_COMPRESSED_LUMINANCE_LATC1_EXT, GL_ZERO, false }, // BC4
|
||||
{ GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT, GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT, GL_ZERO, false }, // BC5
|
||||
{ GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB, GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB, GL_ZERO, false }, // BC6H
|
||||
{ GL_COMPRESSED_RGBA_BPTC_UNORM_ARB, GL_COMPRESSED_RGBA_BPTC_UNORM_ARB, GL_ZERO, false }, // BC7
|
||||
{ GL_ETC1_RGB8_OES, GL_ETC1_RGB8_OES, GL_ZERO, false }, // ETC1
|
||||
{ GL_COMPRESSED_RGB8_ETC2, GL_COMPRESSED_RGB8_ETC2, GL_ZERO, false }, // ETC2
|
||||
{ GL_COMPRESSED_RGBA8_ETC2_EAC, GL_COMPRESSED_RGBA8_ETC2_EAC, GL_ZERO, false }, // ETC2A
|
||||
|
@ -232,6 +234,8 @@ namespace bgfx
|
|||
GL_ZERO, // BC3
|
||||
GL_ZERO, // BC4
|
||||
GL_ZERO, // BC5
|
||||
GL_ZERO, // BC6H
|
||||
GL_ZERO, // BC7
|
||||
GL_ZERO, // ETC1
|
||||
GL_ZERO, // ETC2
|
||||
GL_ZERO, // ETC2A
|
||||
|
@ -310,9 +314,13 @@ namespace bgfx
|
|||
ARB_shader_image_load_store,
|
||||
ARB_shader_storage_buffer_object,
|
||||
ARB_shader_texture_lod,
|
||||
ARB_texture_compression_bptc,
|
||||
ARB_texture_compression_rgtc,
|
||||
ARB_texture_float,
|
||||
ARB_texture_multisample,
|
||||
ARB_texture_rg,
|
||||
ARB_texture_rgb10_a2ui,
|
||||
ARB_texture_stencil8,
|
||||
ARB_texture_storage,
|
||||
ARB_texture_swizzle,
|
||||
ARB_timer_query,
|
||||
|
@ -452,9 +460,13 @@ namespace bgfx
|
|||
{ "ARB_shader_image_load_store", BGFX_CONFIG_RENDERER_OPENGL >= 42, true },
|
||||
{ "ARB_shader_storage_buffer_object", BGFX_CONFIG_RENDERER_OPENGL >= 43, true },
|
||||
{ "ARB_shader_texture_lod", BGFX_CONFIG_RENDERER_OPENGL >= 30, true },
|
||||
{ "ARB_texture_compression_bptc", BGFX_CONFIG_RENDERER_OPENGL >= 44, true },
|
||||
{ "ARB_texture_compression_rgtc", BGFX_CONFIG_RENDERER_OPENGL >= 30, true },
|
||||
{ "ARB_texture_float", BGFX_CONFIG_RENDERER_OPENGL >= 30, true },
|
||||
{ "ARB_texture_multisample", BGFX_CONFIG_RENDERER_OPENGL >= 32, true },
|
||||
{ "ARB_texture_rg", BGFX_CONFIG_RENDERER_OPENGL >= 30, true },
|
||||
{ "ARB_texture_rgb10_a2ui", BGFX_CONFIG_RENDERER_OPENGL >= 33, true },
|
||||
{ "ARB_texture_stencil8", false, true },
|
||||
{ "ARB_texture_storage", BGFX_CONFIG_RENDERER_OPENGL >= 42, true },
|
||||
{ "ARB_texture_swizzle", BGFX_CONFIG_RENDERER_OPENGL >= 33, true },
|
||||
{ "ARB_timer_query", BGFX_CONFIG_RENDERER_OPENGL >= 33, true },
|
||||
|
|
|
@ -263,6 +263,22 @@ typedef uint64_t GLuint64;
|
|||
# define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138
|
||||
#endif // GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG
|
||||
|
||||
#ifndef GL_COMPRESSED_RGBA_BPTC_UNORM_ARB
|
||||
# define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
|
||||
#endif // GL_COMPRESSED_RGBA_BPTC_UNORM_ARB
|
||||
|
||||
#ifndef GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB
|
||||
# define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D
|
||||
#endif // GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB
|
||||
|
||||
#ifndef GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB
|
||||
# define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E
|
||||
#endif // GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB
|
||||
|
||||
#ifndef GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB
|
||||
# define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F
|
||||
#endif // GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB
|
||||
|
||||
#ifndef GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE
|
||||
# define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
|
||||
#endif // GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE
|
||||
|
|
Loading…
Reference in a new issue