GLES2 polyline drawn as GL_LINE_STRIP to match GLES3 #38734
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Fixes #38703.
Notes
Although this is 'correct', we should also consider that it is a breaking change, that may affect people who have been relying on the bugged behaviour. Do we have a
drawlines
methods they can change to that does multiple line segments?It seems Item::Command::TYPE_LINE is for single lines. Maybe we could have some kind of variation of
draw_polyline
that allows separate segments?