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

Missing DXGI_USAGE Constants? #57

Closed Telanor closed 3 months ago

Telanor commented 3 months ago

Hi, it seems like some of the DXGI constants are missing, specifically I can't find these:

https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/dxgi-usage

It seems like all the DXGI constants are missing except for the debug ones: https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/dxgi-debug-id

These are the only ones I see included:

namespace DirectN
{
    public static class DXGIConstants
    {
        public static readonly Guid DXGI_DEBUG_ALL = new Guid("e48ae283-da80-490b-87e6-43e9a9cfda08");

        public static readonly Guid DXGI_DEBUG_DX = new Guid("35cdd7fc-13b2-421d-a5d7-7e4451287d64");

        public static readonly Guid DXGI_DEBUG_DXGI = new Guid("25cddaa4-b1c6-47e1-ac3e-98875b5a2e2a");

        public static readonly Guid DXGI_DEBUG_APP = new Guid("06cd6e01-4219-4ebd-8709-27ed23360c62");

        public static readonly Guid DXGI_DEBUG_D3D10 = new Guid("243b4c52-3606-4d3a-99d7-a7e7b33ed706");

        public static readonly Guid DXGI_DEBUG_D3D11 = new Guid("4b99317b-ac39-4aa6-bb0b-baa04784798f");

        public static readonly Guid DXGI_DEBUG_D3D12 = new Guid("cf59a98c-a950-4326-91ef-9bbaa17bfd95");
    }
}
smourier commented 3 months ago

Hi, these ones are defined in Constants.cs https://github.com/smourier/DirectN/blob/master/DirectN/DirectN/Generated/Constants.cs#L482

    public const int DXGI_USAGE_BACK_BUFFER = 64;
    public const int DXGI_USAGE_DISCARD_ON_PRESENT = 512;
    public const int DXGI_USAGE_READ_ONLY = 256;
    public const int DXGI_USAGE_RENDER_TARGET_OUTPUT = 32;
    public const int DXGI_USAGE_SHADER_INPUT = 16;
    public const int DXGI_USAGE_SHARED = 128;
    public const int DXGI_USAGE_UNORDERED_ACCESS = 1024;

Constants in XXXConstants are usually constants defined manually by me.

Telanor commented 3 months ago

Ah, I was thrown off by the specific DXGIConstants, I didn't see there was just a "Constants" class. Thank you!