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

Remove GuiBatchRenderer #475

Merged
merged 3 commits into from
Sep 1, 2024

Conversation

seji1
Copy link
Contributor

@seji1 seji1 commented Jul 28, 2024

Removes GuIBatchRenderer and big chunk of comment in DebugScreenOverlayM related to it, refactors ProfilerOverlay to use GuiRenderer instead, adds drawString that allow to disable shadow and fill with batching methods into GuiRenderer.

@xCollateral
Copy link
Owner

While a refactor of the GUI rendering classes is needed, removing GuiBatchRenderer and replacing calls with GuiRenderer methods results in losing the batch rendering functionality.
In my opinion before removing GuiBatchRenderer, the batch rendering functionality should be implemented in the GuiRenderer class.

@seji1
Copy link
Contributor Author

seji1 commented Aug 31, 2024

While a refactor of the GUI rendering classes is needed, removing GuiBatchRenderer and replacing calls with GuiRenderer methods results in losing the batch rendering functionality. In my opinion before removing GuiBatchRenderer, the batch rendering functionality should be implemented in the GuiRenderer class.

As you said in discord, this class was not really needed. Why keep batch rendering for GUI if all its functionality can be done with less overhead either with vanilla GuiGraphics (which uses batch rendering already AFAIK) or our GuiRenderer? I see no reason to keep these methods if they won't be used anywhere.

Also some methods are just copied from vanilla, what's the point in code duplication?

@xCollateral
Copy link
Owner

Indeed it could be delete, but the batch rendering functionality might be useful. Besides the PR actually increases CPU overhead (even if it's minimal) due to the lack of batching.

@seji1 seji1 marked this pull request as draft August 31, 2024 17:55
@seji1 seji1 marked this pull request as ready for review September 1, 2024 14:50
@xCollateral xCollateral merged commit 81a7bd7 into xCollateral:1.20.x Sep 1, 2024
2 checks passed
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.

2 participants