DearImguiSharp icon indicating copy to clipboard operation
DearImguiSharp copied to clipboard

Using with DirectX?

Open jjb-pro opened this issue 10 months ago • 0 comments

Hello, thank you very much for the wrapper.

I have a problem when I want to use ImGUI with DirectX 11 (wrapper is Silk.NET), because the ImGUI window does not appear.

I use this code after initialising device and deviceContext:

ImGui.CreateContext(null);
ImGui.Initialise();
ImGui.ImGuiImplDX11Init(new(device), new(deviceContext));
ImGui.StyleColorsDark(null);

And I use this code every frame vor swapchain.Present(1, 0):

ImGui.ImGuiImplDX11NewFrame();
ImGui.NewFrame();
var open = true;
ImGui.Begin("Test", ref open, 0);
ImGui.LabelText("Hello, World!", "Test");
ImGui.End();
ImGui.Render();
ImGui.ImGuiImplDX11RenderDrawData(ImGui.GetDrawData());

Have I forgotten something, or what is the reason that the window is not displayed?

jjb-pro avatar Apr 23 '24 12:04 jjb-pro