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

docking
Richard Mitton 6 years ago committed by omar
parent ff0c6c2bde
commit 7a536f1bd2

@ -603,7 +603,10 @@ static void ImGui_ImplGlfw_SwapBuffers(ImGuiViewport* viewport, void*)
{ {
ImGuiViewportDataGlfw* data = (ImGuiViewportDataGlfw*)viewport->PlatformUserData; ImGuiViewportDataGlfw* data = (ImGuiViewportDataGlfw*)viewport->PlatformUserData;
if (g_ClientApi == GlfwClientApi_OpenGL) if (g_ClientApi == GlfwClientApi_OpenGL)
{
glfwMakeContextCurrent(data->Window);
glfwSwapBuffers(data->Window); glfwSwapBuffers(data->Window);
}
} }
//-------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------

Loading…
Cancel
Save