Skip to content
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

Polygon border draw order #754

Open
jbeezley opened this issue Dec 14, 2017 · 4 comments
Open

Polygon border draw order #754

jbeezley opened this issue Dec 14, 2017 · 4 comments
Labels

Comments

@jbeezley
Copy link
Contributor

When drawing a polygon on top of another polygon with a border, the draw order is sometimes not consistent between the border and the interior. I assume this is caused by internally creating a line feature to draw the border of a polygon. In the attached image, all colors are fully opaque.

test

@jbeezley jbeezley added the bug label Dec 14, 2017
@manthey
Copy link
Contributor

manthey commented Dec 14, 2017

Yes -- we draw all of the interiors, and then all of the borders. I'll have to think about an efficient solution to this.

@manthey
Copy link
Contributor

manthey commented Dec 15, 2017

We should be able to use a z-value during the gl rendering to fix this.

@aashish24
Copy link
Member

David if it is gl backend one efficient solution would be to disable depth write so whatever is drawn last will win.

@manthey
Copy link
Contributor

manthey commented Dec 15, 2017

That is the current problem -- we draw all of the interiors, then we draw all of the borders. The last drawn wins. In this case, it will still be more efficient to draw all of the interiors and then all of the borders, since the set up for each (especially borders) is complicated due to all of the possible options. If we map the z-values properly, it will add only a small rendering time penalty (and sometimes by not having to modify the drawing buffer, might actually speed things up), and fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants