Skip to content

Interface Not Registered #1589

@RealCaseofgames

Description

@RealCaseofgames

I am trying to use D3D11 in Silk.NET, and I am following the sample given in this GitHub repository. However, I reach this line of code:
SilkMarshal.ThrowHResult(factory.CreateSwapChainForHwnd(
device,
_renderWindow.WindowSurface.Native!.DXHandle!.Value,
in scd,
null,
ref Unsafe.NullRef<IDXGIOutput>(),
ref swapchain));

When I reach it, the API throws a System.ArgumentException that reads "Interface not registered." I cannot figure out why. Is there something I am missing?

My Swap Chain is defined as:
private ComPtr<IDXGISwapChain1> swapchain = default;

I also define my Factory as:
ComPtr<IDXGIFactory2> factory = dxgi.CreateDXGIFactory<IDXGIFactory2>();

My Swap Chain Description is:
SwapChainDesc1 scd = new();
scd.SampleDesc = new SampleDesc(1, 0);
scd.BufferUsage = DXGI.UsageRenderTargetOutput;
scd.BufferCount = 2;
scd.SwapEffect = SwapEffect.Discard;
scd.Flags = (uint)SwapChainFlag.AllowModeSwitch;

I have also abstracted the window handle into its own class.

I am unsure if this is the right place to ask this question, but I don't really know where else to put it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions