ImGuiNET / ImGui.NET

An ImGui wrapper for .NET.
MIT License
1.87k stars 305 forks source link

Problem with starting imgui.net #433

Closed dinkelspiel closed 12 months ago

dinkelspiel commented 1 year ago

When trying to start my monogame project with Monogame.ImGuiNet and ImGui.NET i get

System.MissingMethodException: 'Method not found: 'ImGuiNET.RangePtrAccessor`1<ImGuiNET.ImDrawListPtr> ImGuiNET.ImDrawDataPtr.get_CmdListsRange()'.'

code:

imGuiRenderer.BeforeLayout(gameTime);

imGuiRenderer.AfterLayout();

it is run in the draw method

zaafar commented 1 year ago

Use CmdLists instead of CmdListsRange

dinkelspiel commented 1 year ago

How would you index an IntPtr? I'm not really familiar in working with lower level tools

ImDrawListPtr cmdList = drawData.CmdListsRange[n];
ImDrawListPtr cmdList = drawData.CmdLists[n];

// Can't index an IntPtr

zaafar commented 1 year ago

It’s not an IntPtr anymore: https://github.com/ImGuiNET/ImGui.NET/blob/master/src/ImGui.NET.SampleProgram/ImGuiController.cs#L442

dinkelspiel commented 1 year ago

Must be an outdated dependency of the monogame library ill check it out