mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Cleanup.
This commit is contained in:
parent
8cdc2a1d15
commit
1aced4d4ec
5 changed files with 46 additions and 47 deletions
|
@ -106,9 +106,6 @@ Dependencies
|
|||
|
||||
[https://github.com/bkaradzic/bx](https://github.com/bkaradzic/bx)
|
||||
|
||||
Optional:
|
||||
[https://github.com/mendsley/tinystl](https://github.com/mendsley/tinystl)
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
|
@ -274,10 +271,11 @@ cross-platform shaders.
|
|||
|
||||
### Texture Compiler (texturec)
|
||||
|
||||
This tool doesn't currently exist. To produce DDS or KTX textures use:
|
||||
This tool doesn't currently exist. To produce DDS, KTX or PVR textures use:
|
||||
|
||||
[.dds - nVidia Texture Tools - DDS Utilities](https://developer.nvidia.com/legacy-texture-tools)
|
||||
[.ktx - Mali GPU Texture Compression Tool](http://malideveloper.arm.com/develop-for-mali/mali-gpu-texture-compression-tool/)
|
||||
[.pvr - PowerVR Insider SDK](http://www.imgtec.com/powervr/insider/sdkdownloads/index.asp)
|
||||
|
||||
### Geometry Compiler (geometryc)
|
||||
|
||||
|
|
|
@ -525,7 +525,6 @@ namespace bgfx
|
|||
///
|
||||
/// @param _width Width of input image (pixels).
|
||||
/// @param _height Height of input image (pixels).
|
||||
/// @param _pitch Pitch of input image (bytes).
|
||||
/// @param _src Source image.
|
||||
/// @param _dst Destination image. Must be the same size as input image.
|
||||
/// _dst might be pointer to the same memory as _src.
|
||||
|
|
|
@ -230,7 +230,6 @@ namespace bgfx
|
|||
extern FreeFn g_free;
|
||||
|
||||
void release(const Memory* _mem);
|
||||
uint32_t getBitsPerPixel(TextureFormat::Enum _format);
|
||||
const char* getAttribName(Attrib::Enum _attr);
|
||||
bool renderFrame();
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -39,6 +39,9 @@ namespace bgfx
|
|||
void decode(uint8_t* _dst);
|
||||
};
|
||||
|
||||
///
|
||||
uint32_t getBitsPerPixel(TextureFormat::Enum _format);
|
||||
|
||||
///
|
||||
void imageSolid(uint32_t _width, uint32_t _height, uint32_t _solid, void* _dst);
|
||||
|
||||
|
|
Loading…
Reference in a new issue