compressed texture file header

This commit is contained in:
hyzboy 2021-12-14 10:34:44 +08:00
parent 273c99e0ce
commit 7c2af6788d
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ namespace hgl
struct alignas(8) TextureFileHeader
{
uint8 id_str[8]; ///<Texture\x1A
uint8 id_str[7]; ///<Texture\x1A
uint8 version; ///<必须为0
uint8 type; ///<贴图类型等同于VkImageViewType

View File

@ -178,7 +178,7 @@ namespace hgl
if(is->Read(&file_header,sizeof(TextureFileHeader))!=sizeof(TextureFileHeader))
return(false);
constexpr char TEXTURE_FILE_HEADER[]="Texture\x1A";
constexpr char TEXTURE_FILE_HEADER[]="Texture";
constexpr uint TEXTURE_FILE_HEADER_LENGTH=sizeof(TEXTURE_FILE_HEADER)-1;
if(memcmp(&file_header.id_str,TEXTURE_FILE_HEADER,TEXTURE_FILE_HEADER_LENGTH))