support compress texture file format.

This commit is contained in:
2020-08-06 21:27:58 +08:00
parent 7f2c5b0a1c
commit a5ab2edf12
8 changed files with 73 additions and 26 deletions

View File

@@ -48,8 +48,7 @@ namespace hgl
}
}
pixel_bytes =GetStrideByFormat(tile_texture->GetFormat());
tile_bytes =tile_width*tile_height*pixel_bytes;
tile_bytes=GetImageBytes(tile_texture->GetFormat(),tile_width*tile_height);
tile_buffer=device->CreateBuffer(VK_BUFFER_USAGE_TRANSFER_SRC_BIT,tile_bytes*tile_max_count,nullptr);