smourier / DirectN

Direct interop Code for .NET Framework, .NET Core and .NET 5+ : DXGI, WIC, DirectX 9 to 12, Direct2D, Direct Write, Direct Composition, Media Foundation, WASAPI, CodecAPI, GDI, Spatial Audio, DVD, Windows Media Player, UWP DXInterop, WinUI3, etc.
MIT License
311 stars 28 forks source link

a missing member of DXGI_FORMAT #45

Closed vmx17 closed 12 months ago

vmx17 commented 12 months ago

Hello! I think "DirectN.DXGI_FORMAT.DXGI_FORMAT_A4B4G4R4_UNORM" is missing. It's value is 191. It seems the most recently added member. And I discovered 'DXGI_FORMAT_FORCE_UINT (-1)'. Are there any situation I can utilize it?

smourier commented 12 months ago

Hi,

DXGI_FORMAT_FORCE_UINT is just a bitmask (UINT/DWORD/0xFFFFFFFF), not a real format.

As for DXGI_FORMAT_A4B4G4R4_UNORM it's not defined in the latest Windows SDK 10.0.22621, as far as I known only DirectXTex defines WIN11_DXGI_FORMAT_A4B4G4R4_UNORM here https://github.com/microsoft/DirectXTex/blob/main/DirectXTex/DirectXTexP.h#L192

It will be added if it ever makes it into the Windows SDK (dxgiformat.h)

vmx17 commented 12 months ago

Hi! Thanks for rapid answer. What I see is Windows.Win32.winmd of Win32metadata with ILSpy. Its namespace is Windows.Win32.Graphics.Dxgi.Common.DXGI_FORMAT. So the Win32metadata (version 54.0.44.28566) might be differ from the SDK. Anyway, I'll just remove the member from my code. It might be no problem. These days, I'm digging Dxgi APIs to get font information, then in some part, I need interop DirectN and CsWin32.