ImGuiNET / ImGui.NET

An ImGui wrapper for .NET.
MIT License
1.9k stars 306 forks source link

imguizmo.NET memory exeption #423

Closed Samma2009 closed 8 months ago

Samma2009 commented 1 year ago

hi after installing imguizmo.NET and trying to implement it i'm getting System.AccessViolationException, the following code is on the OnRenderFrame(FrameEventArgs e) void

controller.Update(this, (float)e.Time);

ImGui.Begin("test");
ImGui.Button("click");
ImGui.End();
// Initialize ImGuizmo (do not care about the variables they are for testing)
var view = OpenTK_TO_Numerics_matrix4x4(_camera.GetViewMatrix());
var projection = OpenTK_TO_Numerics_matrix4x4(_camera.GetProjectionMatrix());
var mt = System.Numerics.Matrix4x4.Identity;

// Start a new ImGui frame
ImGui.NewFrame();

// Call ImGuizmo.BeginFrame() right after ImGui.NewFrame()
ImGuizmo.BeginFrame();

//ImGuizmo.Manipulate(ref view, ref projection,OPERATION.TRANSLATE,MODE.WORLD,ref mt);

//imnodesNET.imnodes.BeginNodeEditor();

controller.Render();
Dear_ImGui_Sample.ImGuiController.CheckGLError("End of frame");

SwapBuffers();
chingham commented 8 months ago

Did you find the solution ? A sample for ImGuizmo would be helpful !

Samma2009 commented 8 months ago

Did you find the solution ? A sample for ImGuizmo would be helpful !

hi, yes i found a solution and turns out it was a bug of my bindings version