diff --git a/src/gl/data/gl_vertexbuffer.cpp b/src/gl/data/gl_vertexbuffer.cpp index 71bac435c..b18b367c3 100644 --- a/src/gl/data/gl_vertexbuffer.cpp +++ b/src/gl/data/gl_vertexbuffer.cpp @@ -213,6 +213,17 @@ FFlatVertexBuffer::~FFlatVertexBuffer() map = nullptr; } +void FFlatVertexBuffer::OutputResized(int width, int height) +{ + vbo_shadowdata[4].Set(0, 0, 0, 0, 0); + vbo_shadowdata[5].Set(0, (float)height, 0, 0, 0); + vbo_shadowdata[6].Set((float)width, 0, 0, 0, 0); + vbo_shadowdata[7].Set((float)width, (float)height, 0, 0, 0); + + Map(); + memcpy(map, &vbo_shadowdata[4], 4 * sizeof(FFlatVertex)); + Unmap(); +} void FFlatVertexBuffer::BindVBO() { diff --git a/src/gl/data/gl_vertexbuffer.h b/src/gl/data/gl_vertexbuffer.h index 1e9692f48..596de35d9 100644 --- a/src/gl/data/gl_vertexbuffer.h +++ b/src/gl/data/gl_vertexbuffer.h @@ -131,6 +131,8 @@ public: FFlatVertexBuffer(int width, int height); ~FFlatVertexBuffer(); + void OutputResized(int width, int height); + void BindVBO(); void CreateVBO(); diff --git a/src/gl/system/gl_framebuffer.cpp b/src/gl/system/gl_framebuffer.cpp index a61d139c0..07d8abaef 100644 --- a/src/gl/system/gl_framebuffer.cpp +++ b/src/gl/system/gl_framebuffer.cpp @@ -192,6 +192,7 @@ void OpenGLFrameBuffer::Update() { Resize(clientWidth, clientHeight); V_OutputResized(Width, Height); + GLRenderer->mVBO->OutputResized(Width, Height); } }