|
|
@@ -792,22 +792,22 @@ namespace bgfx
|
|
|
|
|
|
} s_translateDdsFormat[] =
|
|
|
{
|
|
|
- { DDS_DXT1, TextureFormat::BC1 },
|
|
|
- { DDS_DXT2, TextureFormat::BC2 },
|
|
|
- { DDS_DXT3, TextureFormat::BC2 },
|
|
|
- { DDS_DXT4, TextureFormat::BC3 },
|
|
|
- { DDS_DXT5, TextureFormat::BC3 },
|
|
|
- { DDS_ATI1, TextureFormat::BC4 },
|
|
|
- { DDS_BC4U, TextureFormat::BC4 },
|
|
|
- { DDS_ATI2, TextureFormat::BC5 },
|
|
|
- { DDS_BC5U, TextureFormat::BC5 },
|
|
|
- { D3DFMT_A16B16G16R16, TextureFormat::RGBA16 },
|
|
|
- { D3DFMT_A16B16G16R16F, TextureFormat::RGBA16F },
|
|
|
- { DDPF_RGB, TextureFormat::BGRX8 },
|
|
|
- { DDPF_RGB|DDPF_ALPHAPIXELS, TextureFormat::BGRA8 },
|
|
|
- { DDPF_INDEXED, TextureFormat::L8 },
|
|
|
- { DDPF_LUMINANCE, TextureFormat::L8 },
|
|
|
- { DDPF_ALPHA, TextureFormat::L8 },
|
|
|
+ { DDS_DXT1, TextureFormat::BC1 },
|
|
|
+ { DDS_DXT2, TextureFormat::BC2 },
|
|
|
+ { DDS_DXT3, TextureFormat::BC2 },
|
|
|
+ { DDS_DXT4, TextureFormat::BC3 },
|
|
|
+ { DDS_DXT5, TextureFormat::BC3 },
|
|
|
+ { DDS_ATI1, TextureFormat::BC4 },
|
|
|
+ { DDS_BC4U, TextureFormat::BC4 },
|
|
|
+ { DDS_ATI2, TextureFormat::BC5 },
|
|
|
+ { DDS_BC5U, TextureFormat::BC5 },
|
|
|
+ { D3DFMT_A16B16G16R16, TextureFormat::RGBA16 },
|
|
|
+ { D3DFMT_A16B16G16R16F, TextureFormat::RGBA16F },
|
|
|
+ { DDPF_RGB, TextureFormat::BGRX8 },
|
|
|
+ { DDPF_RGB|DDPF_ALPHAPIXELS, TextureFormat::BGRA8 },
|
|
|
+ { DDPF_INDEXED, TextureFormat::L8 },
|
|
|
+ { DDPF_LUMINANCE, TextureFormat::L8 },
|
|
|
+ { DDPF_ALPHA, TextureFormat::L8 },
|
|
|
};
|
|
|
|
|
|
bool imageParseDds(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader)
|
|
|
@@ -960,30 +960,30 @@ namespace bgfx
|
|
|
|
|
|
} s_translateKtxFormat[] =
|
|
|
{
|
|
|
- { KTX_COMPRESSED_RGBA_S3TC_DXT1_EXT, TextureFormat::BC1 },
|
|
|
- { KTX_COMPRESSED_RGBA_S3TC_DXT3_EXT, TextureFormat::BC2 },
|
|
|
- { KTX_COMPRESSED_RGBA_S3TC_DXT5_EXT, TextureFormat::BC3 },
|
|
|
- { KTX_COMPRESSED_LUMINANCE_LATC1_EXT, TextureFormat::BC4 },
|
|
|
- { KTX_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT, TextureFormat::BC5 },
|
|
|
- { KTX_ETC1_RGB8_OES, TextureFormat::ETC1 },
|
|
|
- { KTX_COMPRESSED_RGB8_ETC2, TextureFormat::ETC2 },
|
|
|
- { KTX_COMPRESSED_RGBA8_ETC2_EAC, TextureFormat::ETC2A },
|
|
|
- { KTX_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, TextureFormat::ETC2A1 },
|
|
|
- { KTX_COMPRESSED_RGB_PVRTC_2BPPV1_IMG, TextureFormat::PTC12 },
|
|
|
- { KTX_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG, TextureFormat::PTC12A },
|
|
|
- { KTX_COMPRESSED_RGB_PVRTC_4BPPV1_IMG, TextureFormat::PTC14 },
|
|
|
- { KTX_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, TextureFormat::PTC14A },
|
|
|
- { KTX_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG, TextureFormat::PTC22 },
|
|
|
- { KTX_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG, TextureFormat::PTC24 },
|
|
|
- { KTX_RGBA16, TextureFormat::RGBA16 },
|
|
|
- { KTX_RGBA16F, TextureFormat::RGBA16F },
|
|
|
- { KTX_COMPRESSED_R11_EAC, TextureFormat::Unknown },
|
|
|
- { KTX_COMPRESSED_SIGNED_R11_EAC, TextureFormat::Unknown },
|
|
|
- { KTX_COMPRESSED_RG11_EAC, TextureFormat::Unknown },
|
|
|
- { KTX_COMPRESSED_SIGNED_RG11_EAC, TextureFormat::Unknown },
|
|
|
- { KTX_COMPRESSED_SRGB8_ETC2, TextureFormat::Unknown },
|
|
|
- { KTX_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, TextureFormat::Unknown },
|
|
|
- { KTX_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, TextureFormat::Unknown },
|
|
|
+ { KTX_COMPRESSED_RGBA_S3TC_DXT1_EXT, TextureFormat::BC1 },
|
|
|
+ { KTX_COMPRESSED_RGBA_S3TC_DXT3_EXT, TextureFormat::BC2 },
|
|
|
+ { KTX_COMPRESSED_RGBA_S3TC_DXT5_EXT, TextureFormat::BC3 },
|
|
|
+ { KTX_COMPRESSED_LUMINANCE_LATC1_EXT, TextureFormat::BC4 },
|
|
|
+ { KTX_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT, TextureFormat::BC5 },
|
|
|
+ { KTX_ETC1_RGB8_OES, TextureFormat::ETC1 },
|
|
|
+ { KTX_COMPRESSED_RGB8_ETC2, TextureFormat::ETC2 },
|
|
|
+ { KTX_COMPRESSED_RGBA8_ETC2_EAC, TextureFormat::ETC2A },
|
|
|
+ { KTX_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, TextureFormat::ETC2A1 },
|
|
|
+ { KTX_COMPRESSED_RGB_PVRTC_2BPPV1_IMG, TextureFormat::PTC12 },
|
|
|
+ { KTX_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG, TextureFormat::PTC12A },
|
|
|
+ { KTX_COMPRESSED_RGB_PVRTC_4BPPV1_IMG, TextureFormat::PTC14 },
|
|
|
+ { KTX_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, TextureFormat::PTC14A },
|
|
|
+ { KTX_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG, TextureFormat::PTC22 },
|
|
|
+ { KTX_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG, TextureFormat::PTC24 },
|
|
|
+ { KTX_RGBA16, TextureFormat::RGBA16 },
|
|
|
+ { KTX_RGBA16F, TextureFormat::RGBA16F },
|
|
|
+ { KTX_COMPRESSED_R11_EAC, TextureFormat::Unknown },
|
|
|
+ { KTX_COMPRESSED_SIGNED_R11_EAC, TextureFormat::Unknown },
|
|
|
+ { KTX_COMPRESSED_RG11_EAC, TextureFormat::Unknown },
|
|
|
+ { KTX_COMPRESSED_SIGNED_RG11_EAC, TextureFormat::Unknown },
|
|
|
+ { KTX_COMPRESSED_SRGB8_ETC2, TextureFormat::Unknown },
|
|
|
+ { KTX_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, TextureFormat::Unknown },
|
|
|
+ { KTX_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, TextureFormat::Unknown },
|
|
|
};
|
|
|
|
|
|
bool imageParseKtx(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader)
|