From 96b7cb66df340e7f2ab379c7eefd29d74ea9e3a9 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Mon, 12 Sep 2022 14:57:11 -0700 Subject: Fix multiwindow support in GLES3 for X11, Windows, and MacOS. Instead of updating all viewports, then blitting all viewports to the backbuffer, then swapping all buffers, we run through all viewports and render, blit, and swap backbuffer before going to the next viewport. --- platform/windows/gl_manager_windows.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'platform/windows/gl_manager_windows.cpp') diff --git a/platform/windows/gl_manager_windows.cpp b/platform/windows/gl_manager_windows.cpp index d509ff8c51..7689751f1b 100644 --- a/platform/windows/gl_manager_windows.cpp +++ b/platform/windows/gl_manager_windows.cpp @@ -289,12 +289,7 @@ void GLManager_Windows::make_current() { } void GLManager_Windows::swap_buffers() { - // on other platforms, OpenGL swaps buffers for all windows (on all displays, really?) - // Windows swaps buffers on a per-window basis - // REVISIT: this could be structurally bad, should we have "dirty" flags then? - for (KeyValue &entry : _windows) { - SwapBuffers(entry.value.hDC); - } + SwapBuffers(_current_window->hDC); } Error GLManager_Windows::initialize() { -- cgit v1.2.3