-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
draw_polyline skips lines in GLES2 #38703
Comments
Confirmed on Godot v3.2.2.beta.custom_build. e42318e |
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! 😀 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. 👍 |
Fixed by #38734. |
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
The text was updated successfully, but these errors were encountered: