From a5c0f9a5487fa51c36c4f9fd90788fbbb0be6482 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 6 Sep 2016 11:58:22 +0200 Subject: [PATCH] - use the predefined fullscreen vertices for clearing a portal instead of using the quad drawer. --- src/gl/scene/gl_portal.cpp | 7 +------ src/gl/textures/gl_material.h | 2 ++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gl/scene/gl_portal.cpp b/src/gl/scene/gl_portal.cpp index b613032ea1..bd60713b66 100644 --- a/src/gl/scene/gl_portal.cpp +++ b/src/gl/scene/gl_portal.cpp @@ -137,12 +137,7 @@ void GLPortal::ClearScreen() glDisable(GL_MULTISAMPLE); glDisable(GL_DEPTH_TEST); - FQuadDrawer qd; - qd.Set(0, 0, 0, 0, 0, 0); - qd.Set(1, 0, SCREENHEIGHT, 0, 0, 0); - qd.Set(2, SCREENWIDTH, SCREENHEIGHT, 0, 0, 0); - qd.Set(3, SCREENWIDTH, 0, 0, 0, 0); - qd.Render(GL_TRIANGLE_FAN); + glDrawArrays(GL_TRIANGLE_STRIP, FFlatVertexBuffer::FULLSCREEN_INDEX, 4); glEnable(GL_DEPTH_TEST); gl_MatrixStack.Pop(gl_RenderState.mProjectionMatrix); diff --git a/src/gl/textures/gl_material.h b/src/gl/textures/gl_material.h index d44a845f6f..ee42a66d07 100644 --- a/src/gl/textures/gl_material.h +++ b/src/gl/textures/gl_material.h @@ -267,3 +267,5 @@ public: }; #endif + +