Convert WICTextureLoader, DDSTextureLoader12 to strongly typed flags

This commit is contained in:
Chuck Walbourn
2021-06-02 17:13:29 -07:00
parent d694249071
commit 3c9e187d96
8 changed files with 88 additions and 42 deletions

View File

@@ -94,14 +94,13 @@ namespace
//-------------------------------------------------------------------------------------
// WIC Pixel Format nearest conversion table
//-------------------------------------------------------------------------------------
struct WICConvert
{
const GUID& source;
const GUID& target;
const GUID& source;
const GUID& target;
};
constexpr WICConvert g_WICConvert[] =
constexpr WICConvert g_WICConvert [] =
{
// Note target GUID in this conversion table must be one of those directly supported formats (above).
@@ -683,7 +682,7 @@ HRESULT DirectX::LoadWICTextureFromMemoryEx(
size_t wicDataSize,
size_t maxsize,
D3D12_RESOURCE_FLAGS resFlags,
unsigned int loadFlags,
WIC_LOADER_FLAGS loadFlags,
ID3D12Resource** texture,
std::unique_ptr<uint8_t[]>& decodedData,
D3D12_SUBRESOURCE_DATA& subresource) noexcept
@@ -770,7 +769,7 @@ HRESULT DirectX::LoadWICTextureFromFileEx(
const wchar_t* fileName,
size_t maxsize,
D3D12_RESOURCE_FLAGS resFlags,
unsigned int loadFlags,
WIC_LOADER_FLAGS loadFlags,
ID3D12Resource** texture,
std::unique_ptr<uint8_t[]>& decodedData,
D3D12_SUBRESOURCE_DATA& subresource) noexcept