- 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.
This commit is contained in:
Christoph Oelckers 2018-06-02 07:25:41 +02:00
parent 359b13b783
commit 058c5426cd

View file

@ -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; i<flat->sector->subsectorcount; i++)
{