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

ghost
Copy link

@ghost ghost 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.

@ghost ghost force-pushed the guibatchrenderer-removal branch from 259c86b to 2b3d53e Compare July 28, 2024 09:02
@ghost ghost force-pushed the guibatchrenderer-removal branch from 2b3d53e to 375fbdd Compare July 28, 2024 11:06
@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.

@ghost
Copy link
Author

ghost 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.

@ghost ghost marked this pull request as draft August 31, 2024 17:55
@ghost ghost force-pushed the guibatchrenderer-removal branch from d2e5d7f to 3fa90f0 Compare September 1, 2024 14:22
@ghost ghost marked this pull request as ready for review September 1, 2024 14:50
@ghost ghost force-pushed the guibatchrenderer-removal branch from 3fa90f0 to 9fac735 Compare September 1, 2024 15:10
@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