116{
117 ImGui::EndFrame();
118 ImGui::Render();
119 ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
120 ImGuiIO &io = ImGui::GetIO();
121
122 if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
123 {
124 GLFWwindow *backup_current_context = glfwGetCurrentContext();
125 ImGui::UpdatePlatformWindows();
126 ImGui::RenderPlatformWindowsDefault();
127 glfwMakeContextCurrent(backup_current_context);
128 }
129}