hglm / detex

Low-level library for decompression and manipulation of texture blocks compressed using formats such as BC1/DXT1/S3TC, BC2-BC3, BC4/RGTC1, BC5/RGTC2, BC6 (BPTC_FLOAT), BC7 (BPTC), ETC1 and the ETC2 family, loading of KTX and DDS files, and conversion between pixel formats
ISC License
157 stars 40 forks source link

Add support for DDS files with ETC1 fourcc and other fixes #15

Open marco-calautti opened 4 years ago

marco-calautti commented 4 years ago

In mobile applications, it seems that DDS files use a fourCC equal to ETC1, for textures compressed with etc1 (don't know regarding etc2). However the library/tools do not support this format, as no fourcc is specified for ETC1. So, I simply afixed the etc1 entry in the texture_info array by setting support to dds to 1 and giving it a fourcc.

Note: I just realized this should be the right way for adding this support.

I am also including other fixes from other forks that do not affect too much the structure of the project.