From 8f331f56e29116fbe45c46ce5dcedc7e465b3c9f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 25 Aug 2016 23:02:43 +0200 Subject: [PATCH] - use MakeVertices directly in the portal code and remove all related code from RenderWall. --- src/gl/compatibility/gl_20.cpp | 2 +- src/gl/scene/gl_portal.cpp | 4 +++- src/gl/scene/gl_wall.h | 2 +- src/gl/scene/gl_walls_draw.cpp | 24 +++++------------------- 4 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/gl/compatibility/gl_20.cpp b/src/gl/compatibility/gl_20.cpp index c1ba2d2db..f05256452 100644 --- a/src/gl/compatibility/gl_20.cpp +++ b/src/gl/compatibility/gl_20.cpp @@ -773,7 +773,7 @@ void GLWall::RenderLightsCompat(int pass) if (PrepareLight(light, pass)) { vertcount = 0; - RenderWall(RWF_TEXTURED, NULL); + RenderWall(RWF_TEXTURED); } node = node->nextLight; } diff --git a/src/gl/scene/gl_portal.cpp b/src/gl/scene/gl_portal.cpp index 559c14976..bb7166805 100644 --- a/src/gl/scene/gl_portal.cpp +++ b/src/gl/scene/gl_portal.cpp @@ -152,7 +152,9 @@ void GLPortal::DrawPortalStencil() for (unsigned int i = 0; imVBO->RenderArray(GL_TRIANGLE_FAN, offset, count); - vertexcount += count; - } - if (store != NULL) - { - store[0] = offset; - store[1] = count; - } + GLRenderer->mVBO->RenderArray(GL_TRIANGLE_FAN, vertindex, vertcount); + vertexcount += vertcount; } //==========================================================================