From c5096d24de020c6336d21d66838708d845e2d2c7 Mon Sep 17 00:00:00 2001 From: Martin Natano Date: Thu, 14 Nov 2019 21:40:35 +0100 Subject: [PATCH] Update vertex count stats when drawing smooth lines (OGL) (#1932) The statistics are updated in the generic codepath, which is not used by RageDisplay_Legacy::DrawLineStripInternal() when rendering smooth lines. Note, that the output vertex count can differ a lot between smooth lines (2) and non-smooth lines (~38 output vertices per input vertex), so updating the statistics can not be done in RageDisplay::DrawLineStrip() like it is donw for the other draw functions. --- src/RageDisplay_OGL.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/RageDisplay_OGL.cpp b/src/RageDisplay_OGL.cpp index a5fa91385b..4b67af125a 100644 --- a/src/RageDisplay_OGL.cpp +++ b/src/RageDisplay_OGL.cpp @@ -1617,6 +1617,7 @@ void RageDisplay_Legacy::DrawLineStripInternal( const RageSpriteVertex v[], int /* Draw the line loop: */ SetupVertices( v, iNumVerts ); glDrawArrays( GL_LINE_STRIP, 0, iNumVerts ); + StatsAddVerts(iNumVerts); glDisable( GL_LINE_SMOOTH ); @@ -1642,6 +1643,7 @@ void RageDisplay_Legacy::DrawLineStripInternal( const RageSpriteVertex v[], int SetupVertices( v, iNumVerts ); glDrawArrays( GL_POINTS, 0, iNumVerts ); + StatsAddVerts(iNumVerts); glDisable( GL_POINT_SMOOTH ); }