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.