Skip to content
On this page

Nd3d11 Texture Create From File Fix -

// Convert to 32-bit BGRA pWICFactory->CreateFormatConverter(&pConverter); pConverter->Initialize( pFrame, GUID_WICPixelFormat32bppBGRA, WICBitmapDitherTypeNone, nullptr, 0.0, WICBitmapPaletteTypeCustom );

std::wcerr << L"Failed to load image: " << std::hex << hr << std::endl; return 1; nd3d11 texture create from file

HRESULT hr = DirectX::LoadFromDDSFile( L"texture.dds", DirectX::DDS_FLAGS_NONE, &metadata, scratchImage ); // Convert to 32-bit BGRA pWICFactory-&gt

if (SUCCEEDED(hr) && pSRV)