ImGuiNET / ImGui.NET

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

ImGui Viewports (Multi-Windows) #257

Open Pastor111 opened 3 years ago

Pastor111 commented 3 years ago

Hi, i would like to ask if someone knows how to take advantage of the imgui viewports with imgui

zaafar commented 3 years ago

Checkout the docking branch.

Pastor111 commented 3 years ago

Thank you for the suggestion, it almost worked but for some reason i get a System.AccesViolation

zaafar commented 3 years ago

I just cloned the repository on a newly installed windows and changed to the docking branch and compiled/executed the ImGui.NET.SampleProgram application. Everything is working fine.

benblo commented 2 years ago

I'm confused by this... the master branch does have docking support (after enabling the ImGuiConfigFlags.DockingEnable flag, or via the demo window), but viewport support doesn't work for me. The docking branch has both working right out of the box without touching anything... so which branch is the preferred one? I know the docking branch has been the preferred one in vanilla imgui for years now, but if ImGui.NET supports docking in master, does it make any sense to have both branches anymore?

mellinoe commented 2 years ago

@benblo Right, there's no difference in the native bindings between the master branch and the docking branch anymore, and the version in the NuGet package supports both docking and multiple viewports by default. The only remaining difference is that the Veldrid renderer in the docking branch supports multiple viewports, and in the master branch it doesn't.

benblo commented 2 years ago

@mellinoe cool! I'm working off of the docking branch now, and everything is peachy. Please see PR #321 for more info.