From 0fbf2888e73eccc06d4b4bb4ea274d451405fd53 Mon Sep 17 00:00:00 2001 From: Daniel Petrovic Date: Sun, 23 Apr 2023 10:39:13 +0200 Subject: [PATCH] Examples: example_glut_opengl2: Fixed compilation issue (#6361) --- examples/example_glut_opengl2/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example_glut_opengl2/main.cpp b/examples/example_glut_opengl2/main.cpp index b7a07e8bf..fff9043c6 100644 --- a/examples/example_glut_opengl2/main.cpp +++ b/examples/example_glut_opengl2/main.cpp @@ -108,6 +108,7 @@ void MainLoopStep() ImGui_ImplOpenGL2_NewFrame(); ImGui_ImplGLUT_NewFrame(); ImGui::NewFrame(); + ImGuiIO& io = ImGui::GetIO(); // 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) @@ -148,7 +149,6 @@ void MainLoopStep() // Rendering ImGui::Render(); - ImGuiIO& io = ImGui::GetIO(); glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y); glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w); glClear(GL_COLOR_BUFFER_BIT);