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

@@ -43,6 +43,17 @@ namespace DirectX
WIC_LOADER_MAKE_SQUARE = 0x40,
WIC_LOADER_FORCE_RGBA32 = 0x80,
};
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
#endif
DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS);
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif
// Standard version
@@ -70,7 +81,7 @@ namespace DirectX
size_t wicDataSize,
size_t maxsize,
D3D12_RESOURCE_FLAGS resFlags,
unsigned int loadFlags,
WIC_LOADER_FLAGS loadFlags,
_Outptr_ ID3D12Resource** texture,
std::unique_ptr<uint8_t[]>& decodedData,
D3D12_SUBRESOURCE_DATA& subresource) noexcept;
@@ -80,7 +91,7 @@ namespace DirectX
_In_z_ const wchar_t* szFileName,
size_t maxsize,
D3D12_RESOURCE_FLAGS resFlags,
unsigned int loadFlags,
WIC_LOADER_FLAGS loadFlags,
_Outptr_ ID3D12Resource** texture,
std::unique_ptr<uint8_t[]>& decodedData,
D3D12_SUBRESOURCE_DATA& subresource) noexcept;