恢复bc1rgb,bc1rgba的设定
This commit is contained in:
parent
0a3c620c0b
commit
a46dd99564
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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;i<PixelFormatCount;i++)
|
||||
{
|
||||
std::cout<<pf->channels<<": "<<std::setw(10)<<pf->name<<" "<<std::setw(3)<<pf->GetPixelBytes()<<" bits "<<ColorDataName[(uint)(pf->type)]<<std::endl;
|
||||
std::cout<<int(pf->channels)<<": "<<std::setw(10)<<pf->name<<" "<<std::setw(3)<<pf->GetPixelBytes()<<" bits "<<ColorDataName[(uint)(pf->type)]<<std::endl;
|
||||
|
||||
++pf;
|
||||
}
|
||||
|
@ -37,7 +37,8 @@ enum class ColorFormat
|
||||
|
||||
COMPRESS,
|
||||
|
||||
BC1,
|
||||
BC1RGB,
|
||||
BC1RGBA,
|
||||
BC2,
|
||||
BC3,
|
||||
BC4,
|
||||
|
Loading…
x
Reference in New Issue
Block a user