From 058c5426cd4413a37c564d45f2ea216174f36716 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 2 Jun 2018 07:25:41 +0200 Subject: [PATCH] - fixed: OpenGL2 should not use the precalculated vertex buffer data for flat rendering. This wasn't set up properly anymore because the new index-based buffer code is not efficient on GL2, but the render function forgot to skip the buffer checks and jump right to the fallback path. --- src/gl/scene/gl_flats.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gl/scene/gl_flats.cpp b/src/gl/scene/gl_flats.cpp index 70ca080f25..e9a3314e07 100644 --- a/src/gl/scene/gl_flats.cpp +++ b/src/gl/scene/gl_flats.cpp @@ -209,7 +209,11 @@ void FDrawInfo::DrawSubsectors(GLFlat *flat, int pass, bool processlights, bool int dli = flat->dynlightindex; gl_RenderState.Apply(); - if (gl.legacyMode) processlights = false; + if (gl.legacyMode) + { + processlights = false; + goto legacy; + } auto vcount = flat->sector->ibocount; if (vcount > 0 && !gl_RenderState.GetClipLineShouldBeActive()) @@ -243,6 +247,7 @@ void FDrawInfo::DrawSubsectors(GLFlat *flat, int pass, bool processlights, bool } else { + legacy: // Draw the subsectors belonging to this sector for (int i=0; isector->subsectorcount; i++) {