From 4a9b2bf76d148b95a3baa71aa67601cf5643856e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 30 Jan 2016 01:08:11 +0100 Subject: [PATCH] - fixed: The stencil cap drawer did not properly advance the vertex pointer. --- src/gl/scene/gl_portal.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/gl/scene/gl_portal.cpp b/src/gl/scene/gl_portal.cpp index b5ef31e36..42e6fb143 100644 --- a/src/gl/scene/gl_portal.cpp +++ b/src/gl/scene/gl_portal.cpp @@ -154,15 +154,17 @@ void GLPortal::DrawPortalStencil() // Cap the stencil at the top and bottom int n = lines.Size() * 2; FFlatVertex *ptr = GLRenderer->mVBO->GetBuffer(); - ptr->Set(-32767.0f, 32767.0f, -32767.0f, 0, 0); - ptr->Set(-32767.0f, 32767.0f, 32767.0f, 0, 0); - ptr->Set(32767.0f, 32767.0f, 32767.0f, 0, 0); - ptr->Set(32767.0f, 32767.0f, -32767.0f, 0, 0); + ptr[0].Set(-32767.0f, 32767.0f, -32767.0f, 0, 0); + ptr[1].Set(-32767.0f, 32767.0f, 32767.0f, 0, 0); + ptr[2].Set(32767.0f, 32767.0f, 32767.0f, 0, 0); + ptr[3].Set(32767.0f, 32767.0f, -32767.0f, 0, 0); + ptr += 4; mPrimIndices[n + 1] = GLRenderer->mVBO->GetCount(ptr, &mPrimIndices[n]); - ptr->Set(-32767.0f, -32767.0f, -32767.0f, 0, 0); - ptr->Set(-32767.0f, -32767.0f, 32767.0f, 0, 0); - ptr->Set(32767.0f, -32767.0f, 32767.0f, 0, 0); - ptr->Set(32767.0f, -32767.0f, -32767.0f, 0, 0); + ptr[0].Set(-32767.0f, -32767.0f, -32767.0f, 0, 0); + ptr[1].Set(-32767.0f, -32767.0f, 32767.0f, 0, 0); + ptr[2].Set(32767.0f, -32767.0f, 32767.0f, 0, 0); + ptr[3].Set(32767.0f, -32767.0f, -32767.0f, 0, 0); + ptr += 4; mPrimIndices[n + 3] = GLRenderer->mVBO->GetCount(ptr, &mPrimIndices[n + 2]); } }