Examples + Viewport: GLFW: context wasn't set when using multiple windows. (#2392)

features/sdl_renderer3_multiviewports
Richard Mitton ago%!(EXTRA string=6 years) committed by omar
parent ff0c6c2bde
commit 7a536f1bd2
  1. 5
      examples/imgui_impl_glfw.cpp

@ -602,8 +602,11 @@ static void ImGui_ImplGlfw_RenderWindow(ImGuiViewport* viewport, void*)
static void ImGui_ImplGlfw_SwapBuffers(ImGuiViewport* viewport, void*)
{
ImGuiViewportDataGlfw* data = (ImGuiViewportDataGlfw*)viewport->PlatformUserData;
if (g_ClientApi == GlfwClientApi_OpenGL)
if (g_ClientApi == GlfwClientApi_OpenGL)
{
glfwMakeContextCurrent(data->Window);
glfwSwapBuffers(data->Window);
}
}
//--------------------------------------------------------------------------------------------------------

Loading…
Cancel
Save