From e90b5e424a3f92e9a2897197606831a0a811c617 Mon Sep 17 00:00:00 2001 From: Luke Benstead Date: Mon, 9 Jul 2018 19:00:50 +0100 Subject: [PATCH] Fix up triangle strip rendering --- GL/draw.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/GL/draw.c b/GL/draw.c index cf82156..f601edf 100644 --- a/GL/draw.c +++ b/GL/draw.c @@ -281,13 +281,11 @@ static void generate(AlignedVector* output, const GLenum mode, const GLsizei fir vertex->flags = PVR_CMD_VERTEX_EOL; } + } else if(mode == GL_TRIANGLE_STRIP && j == (max - 1)) { + /* If the mode was triangle strip, then the last vertex is the last vertex */ + vertex->flags = PVR_CMD_VERTEX_EOL; } } - - /* If the mode was triangle strip, then the last vertex is the last vertex */ - if(mode == GL_TRIANGLE_STRIP) { - vertex->flags = PVR_CMD_VERTEX_EOL; - } } static void transform(AlignedVector* vertices) {