From b75395aa74515092fd1bd55b4b32f98319ed900e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 28 Sep 2016 09:25:48 +0200 Subject: [PATCH] - fixed: Screen size update coordinates were copied into the wrong buffer location. --- src/gl/data/gl_vertexbuffer.cpp | 2 +- src/gl/system/gl_framebuffer.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gl/data/gl_vertexbuffer.cpp b/src/gl/data/gl_vertexbuffer.cpp index b18b367c37..4e76b51cb3 100644 --- a/src/gl/data/gl_vertexbuffer.cpp +++ b/src/gl/data/gl_vertexbuffer.cpp @@ -221,7 +221,7 @@ void FFlatVertexBuffer::OutputResized(int width, int height) vbo_shadowdata[7].Set((float)width, (float)height, 0, 0, 0); Map(); - memcpy(map, &vbo_shadowdata[4], 4 * sizeof(FFlatVertex)); + memcpy(&map[4], &vbo_shadowdata[4], 4 * sizeof(FFlatVertex)); Unmap(); } diff --git a/src/gl/system/gl_framebuffer.cpp b/src/gl/system/gl_framebuffer.cpp index 08aca521fd..6264352f6c 100644 --- a/src/gl/system/gl_framebuffer.cpp +++ b/src/gl/system/gl_framebuffer.cpp @@ -189,7 +189,9 @@ void OpenGLFrameBuffer::Update() int clientHeight = GetClientHeight(); if (clientWidth > 0 && clientHeight > 0 && (Width != clientWidth || Height != clientHeight)) { - Resize(clientWidth, clientHeight); + // Do not call Resize here because it's only for software canvases + Pitch = Width = clientWidth; + Height = clientHeight; V_OutputResized(Width, Height); GLRenderer->mVBO->OutputResized(Width, Height); }