From 8853485dee7f22e602c229d10d0e41e0b3dc3e9a Mon Sep 17 00:00:00 2001 From: omar Date: Wed, 15 May 2024 15:18:43 +0200 Subject: [PATCH] Updated Multi Viewports (markdown) --- Multi-Viewports.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Multi-Viewports.md b/Multi-Viewports.md index 97df128..4aa30da 100644 --- a/Multi-Viewports.md +++ b/Multi-Viewports.md @@ -33,11 +33,14 @@ if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) { ImGui::UpdatePlatformWindows(); ImGui::RenderPlatformWindowsDefault(); + // TODO for OpenGL: restore current GL context. } ``` That's pretty much it. -There are a few additional multi-viewports related configuration flags in the io structure which you may toy with. +There may be additional calls required surrounding this depending on the backend you are using: OpenGL in particular needs backup/restore of current GL context. Check the [example project](https://github.com/ocornut/imgui/tree/docking/examples) appropriate to your setup for details. + +There are a few additional multi-viewports related configuration flags in the IO structure which you may toy with. If you are using a custom back-end, refer to the `ImGuiPlatformIO` structure and existing `backends/` + `examples/` to implement support for multi-viewports in your engine. This is not particularly easy to add.