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

Fix drawing of 2D primitives in OpenGL3 renderer #67416

Merged
merged 1 commit into from Oct 15, 2022

Conversation

clayjohn
Copy link
Member

Fixes: #67412

Previously the wrong vertices were used when assembling the second triangle of a quad.

In the RD renderer the logic looks a bit different. It loops over only j=1 to j=2. It doesn't need to run j=0 because it is writing over the same array used by the first vertex. In GLES3, since we batch draw calls, the data for all 6 vertices needs to be copied over.

drivers/gles3/rasterizer_canvas_gles3.cpp Outdated Show resolved Hide resolved
Previously the wrong vertices were used when assembling the second triangle
of a quad
@akien-mga akien-mga merged commit 6feded1 into godotengine:master Oct 15, 2022
@akien-mga
Copy link
Member

Thanks!

@clayjohn clayjohn deleted the GLES3-primitive branch November 15, 2022 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.0 GLES3 renderer, CanvasItem draw_primitive() does not correctly handle quads
4 participants