summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-03-21 21:44:33 +0100
committerMichael Lutz <michi@icosahedron.de>2021-03-21 22:26:55 +0100
commitdf958dc90753bd1bec2fa6c4decb5d76ed966417 (patch)
tree8a7b9ef9759c235c89ed3a10cac07f8fe0f77b25 /src/video
parent545ca3d014172fd8460430f0f7e56919c83ab172 (diff)
downloadopenttd-df958dc90753bd1bec2fa6c4decb5d76ed966417.tar.xz
Fix f0f96e31: [OpenGL] Broken window resizing due to invalid buffer pitch on texture creation.
Diffstat (limited to 'src/video')
-rw-r--r--src/video/opengl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video/opengl.cpp b/src/video/opengl.cpp
index 18c71dd29..87cfbbaa6 100644
--- a/src/video/opengl.cpp
+++ b/src/video/opengl.cpp
@@ -909,6 +909,8 @@ bool OpenGLBackend::Resize(int w, int h, bool force)
_glViewport(0, 0, w, h);
+ _glPixelStorei(GL_UNPACK_ROW_LENGTH, pitch);
+
this->vid_buffer = nullptr;
if (this->persistent_mapping_supported) {
_glDeleteBuffers(1, &this->vid_pbo);