mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-05 00:56:13 +00:00
texture asset utils
This commit is contained in:
parent
ce1426d3a1
commit
db16abe84c
2 changed files with 6 additions and 5 deletions
|
@ -66,8 +66,8 @@ bool LoadMips(const std::filesystem::path& asset_path, CustomTextureData::ArrayS
|
|||
}
|
||||
} // namespace
|
||||
bool LoadTextureDataFromFile(const CustomAssetLibrary::AssetID& asset_id,
|
||||
const std::filesystem::path& asset_path,
|
||||
TextureAndSamplerData::Type type, CustomTextureData* data)
|
||||
const std::filesystem::path& asset_path, AbstractTextureType type,
|
||||
CustomTextureData* data)
|
||||
{
|
||||
auto ext = PathToString(asset_path.extension());
|
||||
Common::ToLower(&ext);
|
||||
|
@ -92,7 +92,7 @@ bool LoadTextureDataFromFile(const CustomAssetLibrary::AssetID& asset_id,
|
|||
{
|
||||
// PNG could support more complicated texture types in the future
|
||||
// but for now just error
|
||||
if (type != TextureAndSamplerData::Type::Type_Texture2D)
|
||||
if (type != AbstractTextureType::Texture_2D)
|
||||
{
|
||||
ERROR_LOG_FMT(VIDEO, "Asset '{}' error - PNG is not supported for texture type '{}'!",
|
||||
asset_id, type);
|
||||
|
|
|
@ -7,12 +7,13 @@
|
|||
|
||||
#include "VideoCommon/Assets/CustomAssetLibrary.h"
|
||||
#include "VideoCommon/Assets/TextureAsset.h"
|
||||
#include "VideoCommon/TextureConfig.h"
|
||||
|
||||
namespace VideoCommon
|
||||
{
|
||||
bool LoadTextureDataFromFile(const CustomAssetLibrary::AssetID& asset_id,
|
||||
const std::filesystem::path& asset_path,
|
||||
TextureAndSamplerData::Type type, CustomTextureData* data);
|
||||
const std::filesystem::path& asset_path, AbstractTextureType type,
|
||||
CustomTextureData* data);
|
||||
|
||||
bool ValidateTextureData(const CustomAssetLibrary::AssetID& asset_id, const CustomTextureData& data,
|
||||
u32 native_width, u32 native_height);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue