From e8a72d3e72de751d77f6d0254425b0f8fb40bb43 Mon Sep 17 00:00:00 2001 From: ice1000 Date: Mon, 21 May 2018 07:35:09 +0800 Subject: [PATCH] Examples: GLFW* Make subsequent window creation possible. --- examples/opengl2_example/imgui_impl_glfw_gl2.cpp | 1 + examples/opengl3_example/imgui_impl_glfw_gl3.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/examples/opengl2_example/imgui_impl_glfw_gl2.cpp b/examples/opengl2_example/imgui_impl_glfw_gl2.cpp index 5cc60ec3..ebdf785e 100644 --- a/examples/opengl2_example/imgui_impl_glfw_gl2.cpp +++ b/examples/opengl2_example/imgui_impl_glfw_gl2.cpp @@ -233,6 +233,7 @@ static void ImGui_ImplGlfw_InstallCallbacks(GLFWwindow* window) bool ImGui_ImplGlfwGL2_Init(GLFWwindow* window, bool install_callbacks) { g_Window = window; + g_Time = 0; // Setup back-end capabilities flags ImGuiIO& io = ImGui::GetIO(); diff --git a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp index 163b5db3..49b41134 100644 --- a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp +++ b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp @@ -358,6 +358,7 @@ static void ImGui_ImplGlfw_InstallCallbacks(GLFWwindow* window) bool ImGui_ImplGlfwGL3_Init(GLFWwindow* window, bool install_callbacks, const char* glsl_version) { g_Window = window; + g_Time = 0; // Store GL version string so we can refer to it later in case we recreate shaders. if (glsl_version == NULL)