diff --git a/Getting-Started.md b/Getting-Started.md index 86f5a24..de5db16 100644 --- a/Getting-Started.md +++ b/Getting-Started.md @@ -448,12 +448,17 @@ io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; ``` At the end of your render loop, generally after rendering your main viewport but before presenting/swapping it: ```cpp -// Update and Render additional Platform Windows -ImGui::UpdatePlatformWindows(); -ImGui::RenderPlatformWindowsDefault(); +if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) +{ + // Update and Render additional Platform Windows + ImGui::UpdatePlatformWindows(); + ImGui::RenderPlatformWindowsDefault(); + + // TODO for OpenGL: restore current GL context. +} ``` -Note that there may be additional calls required surrounding this depending on the backend you are using (OpenGL in particular). Check the [example project](https://github.com/ocornut/imgui/tree/docking/examples) appropriate to your setup for details. +Note that 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. ## Once you are setup...