summaryrefslogtreecommitdiff
path: root/src/video/sdl2_opengl_v.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-03-20 19:43:54 +0100
committerGitHub <noreply@github.com>2021-03-20 19:43:54 +0100
commitf0f96e3103c2e740fa4340a5f1854c41df65ffa2 (patch)
tree258d9ae4b04f3f93151bf6bb81f2a7682dd34232 /src/video/sdl2_opengl_v.cpp
parentc92358527bb14e26553a88ca04c34b715b1e9542 (diff)
downloadopenttd-f0f96e3103c2e740fa4340a5f1854c41df65ffa2.tar.xz
Fix #8871: [OpenGL] Initialize all buffers after resize and clear back buffer. (#8877)
Diffstat (limited to 'src/video/sdl2_opengl_v.cpp')
-rw-r--r--src/video/sdl2_opengl_v.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/video/sdl2_opengl_v.cpp b/src/video/sdl2_opengl_v.cpp
index 13ee082ba..86dc104dd 100644
--- a/src/video/sdl2_opengl_v.cpp
+++ b/src/video/sdl2_opengl_v.cpp
@@ -131,6 +131,7 @@ bool VideoDriver_SDL_OpenGL::AllocateBackingStore(int w, int h, bool force)
MemSetT(&this->dirty_rect, 0);
bool res = OpenGLBackend::Get()->Resize(w, h, force);
+ SDL_GL_SwapWindow(this->sdl_window);
_screen.dst_ptr = this->GetVideoPointer();
_cur_palette.first_dirty = 0;