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

UScreen: Fix background drawing on 1.21.2+ #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Johni0702
Copy link
Collaborator

As of 1.21.2 MC's DrawContext will now by default buffer all drawn quads and only flush when strictly necessary.
This however requires that everyone is in on the batching and has all their calls batched as well, otherwise buffered stuff will get rendered much later than it was supposed to. E.g. the vanilla background (much more obvious with the Programmer Art pack which brings back the dirt background) will be rendered on top of most of the Elementa gui.

Ideally we'd get in on the batching too, but that's quite the task, so for the time being this commit fixes the issue by explictly flushing after every time we pass the DrawContext to a vanilla method (i.e. any time something could have been buffered).

For additional context see this conversation in the Essential Discord.

Note: This issue is masked when running with Essential because Essential already happens calls draw from one of its mixins. It can be made apparent again by installing ImmediatelyFast which uses a different VertexConsumerProvider for gui rendering making Essential's draw call on the vanilla VertexConsumerProvider ineffective.

As of 1.21.2 MC's DrawContext will now by default buffer all drawn quads
and only flush when strictly necessary.
This however requires that everyone is in on the batching and has all
their calls batched as well, otherwise buffered stuff will get rendered
much later than it was supposed to. E.g. the vanilla background (much
more obvious with the Programmer Art pack which brings back the dirt
background) will be rendered on top of most of the Elementa gui.

Ideally we'd get in on the batching too, but that's quite the task, so
for the time being this commit fixes the issue by explictly flushing
after every time we pass the DrawContext to a vanilla method (i.e. any
time something could have been buffered).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant