Added WIC_LOADER_FORCE_RGBA32 to WICTextureLoader

This commit is contained in:
Chuck Walbourn
2020-04-20 23:35:43 -07:00
parent e169033b60
commit 90cc562f9c
4 changed files with 16 additions and 0 deletions

View File

@@ -358,6 +358,13 @@ namespace
bpp = _WICBitsPerPixel(pixelFormat);
}
if (loadFlags & WIC_LOADER_FORCE_RGBA32)
{
memcpy_s(&convertGUID, sizeof(WICPixelFormatGUID), &GUID_WICPixelFormat32bppRGBA, sizeof(GUID));
format = DXGI_FORMAT_R8G8B8A8_UNORM;
bpp = 32;
}
if (!bpp)
return E_FAIL;