1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-28 01:20:55 +01:00

Updated Getting Started (markdown)

omar 2024-05-14 14:51:57 +02:00
parent 24a724d379
commit a35843418d

@ -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: At the end of your render loop, generally after rendering your main viewport but before presenting/swapping it:
```cpp ```cpp
// Update and Render additional Platform Windows if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
ImGui::UpdatePlatformWindows(); {
ImGui::RenderPlatformWindowsDefault(); // 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... ## Once you are setup...