diff --git a/backends/imgui_impl_glut.cpp b/backends/imgui_impl_glut.cpp index 4734e492..5a3e7cc1 100644 --- a/backends/imgui_impl_glut.cpp +++ b/backends/imgui_impl_glut.cpp @@ -21,6 +21,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2023-04-17: BREAKING: Removed call to ImGui::NewFrame() from ImGui_ImplGLUT_NewFrame(). Needs to be called from the main application loop, like with every other backends. // 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported). // 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago) with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion. // 2022-01-17: Inputs: calling new io.AddMousePosEvent(), io.AddMouseButtonEvent(), io.AddMouseWheelEvent() API (1.87+). @@ -202,9 +203,6 @@ void ImGui_ImplGLUT_NewFrame() delta_time_ms = 1; io.DeltaTime = delta_time_ms / 1000.0f; g_Time = current_time; - - // Start the frame - ImGui::NewFrame(); } static void ImGui_ImplGLUT_UpdateKeyModifiers() diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 5ad221bd..72771734 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -37,9 +37,13 @@ HOW TO UPDATE? Breaking changes: +- Backends: GLUT: Removed call to ImGui::NewFrame() from ImGui_ImplGLUT_NewFrame(). + It needs to be called from the main app loop, like with every other backends. (#6337) [@GereonV] + Other changes: + ----------------------------------------------------------------------- VERSION 1.89.5 (Released 2023-04-13) ----------------------------------------------------------------------- diff --git a/examples/example_glut_opengl2/main.cpp b/examples/example_glut_opengl2/main.cpp index 9333d13a..b7a07e8b 100644 --- a/examples/example_glut_opengl2/main.cpp +++ b/examples/example_glut_opengl2/main.cpp @@ -107,6 +107,7 @@ void MainLoopStep() // Start the Dear ImGui frame ImGui_ImplOpenGL2_NewFrame(); ImGui_ImplGLUT_NewFrame(); + ImGui::NewFrame(); // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). if (show_demo_window)