Split up the bevy_ui::render
module
#9217
Open
+781
−746
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
The size and mixed-up responsibilities of the
bevy_ui::render
module makes the UI renderer difficult to understand.Solution
Split up the
bevy_ui::render
module so that it is only responsible for setting up the render app. Move the rest of the code into newextract
,prepare
andqueue
modules.Changelog
bevy_ui::render
extract
,prepare
andqueue
modules.mod.rs
contains the render app setup.ExtractedUiNode
,ExtractedUiNodes
,extract_uinodes
,extract_atlas_uinodes
,extract_uinode_borders
andextract_text_uinodes
are moved to theextract
module.prepare_uinodes
,UiVertex
and UiBatchare moved to the
prepare` module.queue_uinodes
is moved to thequeue
module.Migration Guide
extract
,prepare
andqueue
modules have been added tobevy_ui::render
.ExtractedUiNode
,ExtractedUiNodes
,extract_uinodes
,extract_atlas_uinodes
,extract_uinode_borders
andextract_text_uinodes
have been moved to theextract
module.prepare_uinodes
,UiVertex
and UiBatchhave been moved to the
prepare` module.queue_uinodes
has been moved to thequeue
module.