mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 12:38:46 +02:00
Viewport, Platform: SDL: Makes the CreateViewport function restore current GL context so in theory it is free from side-effect. That said, it seems like there is a bug in SDL because our CreateViewport (currently in Render(), not for long) have affect a jerky side-effect if SDL_GL_MakeCurrent() is called before Render(). (#1542)
This commit is contained in:
@ -125,11 +125,11 @@ int main(int, char**)
|
||||
}
|
||||
|
||||
// Rendering
|
||||
ImGui::Render();
|
||||
SDL_GL_MakeCurrent(window, gl_context);
|
||||
glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y);
|
||||
glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
ImGui::Render();
|
||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
ImGui::RenderAdditionalViewports();
|
||||
|
||||
|
Reference in New Issue
Block a user