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

This commit is contained in:
Richard Mitton 2019-03-01 18:55:55 -08:00 committed by omar
parent ff0c6c2bde
commit 7a536f1bd2

View File

@ -603,8 +603,11 @@ static void ImGui_ImplGlfw_SwapBuffers(ImGuiViewport* viewport, void*)
{
ImGuiViewportDataGlfw* data = (ImGuiViewportDataGlfw*)viewport->PlatformUserData;
if (g_ClientApi == GlfwClientApi_OpenGL)
{
glfwMakeContextCurrent(data->Window);
glfwSwapBuffers(data->Window);
}
}
//--------------------------------------------------------------------------------------------------------
// IME (Input Method Editor) basic support for e.g. Asian language users