Godot version:
3.2.1 stable
OS/device including version:
Windows 10
macOS Catalina 10.15.1
Issue description:
When the video driver is set to GLES2, draw_polyline skips every other line, giving a dashed line effect. Switching to GLES3 resolves this issue.
GLES2:

GLES3:

Steps to reproduce:
Call draw_polyline with any set of points. Change video driver between GLES2 and GLES3 to observe difference.
Minimal reproduction project:
Polyline_Test.zip
Confirmed on Godot v3.2.2.beta.custom_build. e42318e
OS: Xubuntu 16.04.6 LTS
Workaround: change default width to:
draw_polyline(circle_points, Color.white, 1.0000001).
draw_polyline(circle_points, Color.white, 1.0000001).
It solves the issue because it makes Godot use triangle strips to draw lines rather than OpenGL's line primitives. See #38417.
The problem is actually simple! GLES3 is drawing a polyline as a GL_LINE_STRIP (each new vertex adds a new linked line) and GLES2 is drawing it as GL_LINES (each pair of vertices forms a line).
All we need to do is agree on a standard so they both do the same thing! :grinning:
Edit: I'm guessing from the instructions that polyline is meant to be joined lines, and that is what the triangle version does in GLES2 as well.
I'll do a little PR that changes it to GL_LINE_STRIP. However it's slightly controversial in that while the behaviour is different (and probably wrong) in GLES2, people may have already written games that rely on this. I'll do the PR anyway and let the authorities decide. :+1:
Fixed by #38734.
Most helpful comment
The problem is actually simple! GLES3 is drawing a polyline as a GL_LINE_STRIP (each new vertex adds a new linked line) and GLES2 is drawing it as GL_LINES (each pair of vertices forms a line).
All we need to do is agree on a standard so they both do the same thing! :grinning:
Edit: I'm guessing from the instructions that polyline is meant to be joined lines, and that is what the triangle version does in GLES2 as well.
I'll do a little PR that changes it to GL_LINE_STRIP. However it's slightly controversial in that while the behaviour is different (and probably wrong) in GLES2, people may have already written games that rely on this. I'll do the PR anyway and let the authorities decide. :+1: