GLES2 polyline drawn as GL_LINE_STRIP to match GLES3
The behaviour of TYPE_POLYLINE appeared incorrect in GLES2, and inconsistent with GLES3 and the docs, which state that draw_polyline 'Draws interconnected line segments'. Also when drawing with triangles GLES2 draws interconnected segments. This PR simply changes the primitive from GL_LINES to GL_LINE_STRIP as in GLES3.
This commit is contained in:
parent
e42318e41c
commit
8005175ea5
1 changed files with 1 additions and 1 deletions
|
@ -1526,7 +1526,7 @@ void RasterizerCanvasGLES2::render_batches(Item::Command *const *p_commands, Ite
|
||||||
offset += to_draw * 2;
|
offset += to_draw * 2;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_draw_generic(GL_LINES, pline->lines.size(), pline->lines.ptr(), NULL, pline->line_colors.ptr(), pline->line_colors.size() == 1);
|
_draw_generic(GL_LINE_STRIP, pline->lines.size(), pline->lines.ptr(), NULL, pline->line_colors.ptr(), pline->line_colors.size() == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GLES_OVER_GL
|
#ifdef GLES_OVER_GL
|
||||||
|
|
Loading…
Reference in a new issue