Examples: Viewport: Disabling swap intervals / vsync on secondary context to match what the DX11 bindings is doing. (#1542)

This commit is contained in:
omar
2018-08-25 20:15:18 +02:00
parent e9c849884a
commit 0ada716184
2 changed files with 8 additions and 0 deletions

View File

@ -391,6 +391,11 @@ static void ImGui_ImplGlfw_CreateWindow(ImGuiViewport* viewport)
glfwSetWindowCloseCallback(data->Window, ImGui_ImplGlfw_WindowCloseCallback);
glfwSetWindowPosCallback(data->Window, ImGui_ImplGlfw_WindowPosCallback);
glfwSetWindowSizeCallback(data->Window, ImGui_ImplGlfw_WindowSizeCallback);
if (g_ClientApi == GlfwClientApi_OpenGL)
{
glfwMakeContextCurrent(data->Window);
glfwSwapInterval(0);
}
}
static void ImGui_ImplGlfw_DestroyWindow(ImGuiViewport* viewport)