diff --git a/TextureFileCreater.cpp b/TextureFileCreater.cpp index 59cef72..ca6c0ec 100644 --- a/TextureFileCreater.cpp +++ b/TextureFileCreater.cpp @@ -104,7 +104,7 @@ bool TextureFileCreater::Write(void *data) if(fmt->format>ColorFormat::COMPRESS) { dos->WriteUint8(0); - dos->WriteUint32(uint(fmt->format)-uint(ColorFormat::COMPRESS)); + dos->WriteUint16(uint(fmt->format)-uint(ColorFormat::COMPRESS)); dos->WriteUint32(total_bytes); } else diff --git a/TextureFileCreaterCompress.cpp b/TextureFileCreaterCompress.cpp index 06cde44..979b692 100644 --- a/TextureFileCreaterCompress.cpp +++ b/TextureFileCreaterCompress.cpp @@ -148,6 +148,7 @@ public: constexpr CMP_FORMAT fmt_list[]= { + CMP_FORMAT_BC1, //ColorFormat::BC1 CMP_FORMAT_BC1, //ColorFormat::BC1 CMP_FORMAT_BC2, //ColorFormat::BC2 CMP_FORMAT_BC3, //ColorFormat::BC3 @@ -160,7 +161,8 @@ public: constexpr char fmt_name_list[][8]= { - "BC1", + "BC1RGB", + "BC1RGBA", "BC2", "BC3", "BC4", @@ -170,7 +172,7 @@ public: "BC7" }; - const int fmt_index=size_t(fmt->format)-size_t(ColorFormat::BC1); + const int fmt_index=size_t(fmt->format)-size_t(ColorFormat::BC1RGB); kernel_options.height =image->height(); kernel_options.width =image->width(); diff --git a/pixel_format.cpp b/pixel_format.cpp index bcb97ee..e0940ca 100644 --- a/pixel_format.cpp +++ b/pixel_format.cpp @@ -51,7 +51,8 @@ namespace hgl {ColorFormat::COMPRESS, "COMPRESS", 0,{ 0 , 0 , 0 , 0 },{ 0, 0, 0, 0},ColorDataType::NONE}, - {ColorFormat::BC1, "BC1", 0,{ 0 , 0 , 0 , 0 },{ 0, 0, 0, 0},ColorDataType::NONE}, + {ColorFormat::BC1RGB, "BC1RGB", 0,{ 0 , 0 , 0 , 0 },{ 0, 0, 0, 0},ColorDataType::NONE}, + {ColorFormat::BC1RGBA, "BC1RGBA", 0,{ 0 , 0 , 0 , 0 },{ 0, 0, 0, 0},ColorDataType::NONE}, {ColorFormat::BC2, "BC2", 0,{ 0 , 0 , 0 , 0 },{ 0, 0, 0, 0},ColorDataType::NONE}, {ColorFormat::BC3, "BC3", 0,{ 0 , 0 , 0 , 0 },{ 0, 0, 0, 0},ColorDataType::NONE}, {ColorFormat::BC4, "BC4", 0,{ 0 , 0 , 0 , 0 },{ 0, 0, 0, 0},ColorDataType::NONE}, @@ -70,7 +71,7 @@ void PrintFormatList() for(uint i=0;ichannels<<": "<name<<" "<GetPixelBytes()<<" bits "<type)]<channels)<<": "<name<<" "<GetPixelBytes()<<" bits "<type)]<