From c959b9f6d615464f77315f3bcca32517eedd2215 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Sat, 26 Aug 2023 00:31:46 +0200 Subject: [PATCH] don't need to set line width again and again --- BBGE/TileRender.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BBGE/TileRender.cpp b/BBGE/TileRender.cpp index a7df141..ac8f0eb 100644 --- a/BBGE/TileRender.cpp +++ b/BBGE/TileRender.cpp @@ -46,6 +46,9 @@ void TileRender::onRender(const RenderState& rs) const if(storage.tiles.empty()) return; + if(renderBorders) + glLineWidth(2); + RenderState rx(rs); // prepare. get parallax scroll factors @@ -187,7 +190,6 @@ void TileRender::onRender(const RenderState& rs) const core->getDefaultQuadBorderBuf()->apply(); glPointSize(16); glDrawArrays(GL_POINTS, 4, 1); - glLineWidth(2); glDrawArrays(GL_LINE_LOOP, 0, 4); } }