From 7c2886e8ea336c831cb926ff51da7fbfdb9f5587 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 16 Sep 2016 08:10:19 +0200 Subject: [PATCH] - fixed the last commit: The altered vertices must always be copied to the actual buffer and it's not necessary to copy everything, copying the 4 changed ones is sufficient. --- src/gl/data/gl_vertexbuffer.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gl/data/gl_vertexbuffer.cpp b/src/gl/data/gl_vertexbuffer.cpp index 844ff9212b..b18b367c37 100644 --- a/src/gl/data/gl_vertexbuffer.cpp +++ b/src/gl/data/gl_vertexbuffer.cpp @@ -220,12 +220,9 @@ void FFlatVertexBuffer::OutputResized(int width, int height) vbo_shadowdata[6].Set((float)width, 0, 0, 0, 0); vbo_shadowdata[7].Set((float)width, (float)height, 0, 0, 0); - if (gl.buffermethod == BM_DEFERRED) - { - Map(); - memcpy(map, &vbo_shadowdata[0], mNumReserved * sizeof(FFlatVertex)); - Unmap(); - } + Map(); + memcpy(map, &vbo_shadowdata[4], 4 * sizeof(FFlatVertex)); + Unmap(); } void FFlatVertexBuffer::BindVBO()