mirror of
https://github.com/bevyengine/bevy
synced 2024-12-22 02:53:07 +00:00
9da0b2a0ec
This commit makes us stop using the render world ECS for `BinnedRenderPhase` and `SortedRenderPhase` and instead use resources with `EntityHashMap`s inside. There are three reasons to do this: 1. We can use `clear()` to clear out the render phase collections instead of recreating the components from scratch, allowing us to reuse allocations. 2. This is a prerequisite for retained bins, because components can't be retained from frame to frame in the render world, but resources can. 3. We want to move away from storing anything in components in the render world ECS, and this is a step in that direction. This patch results in a small performance benefit, due to point (1) above. ## Changelog ### Changed * The `BinnedRenderPhase` and `SortedRenderPhase` render world components have been replaced with `ViewBinnedRenderPhases` and `ViewSortedRenderPhases` resources. ## Migration Guide * The `BinnedRenderPhase` and `SortedRenderPhase` render world components have been replaced with `ViewBinnedRenderPhases` and `ViewSortedRenderPhases` resources. Instead of querying for the components, look the camera entity up in the `ViewBinnedRenderPhases`/`ViewSortedRenderPhases` tables. |
||
---|---|---|
.. | ||
2d_shapes.rs | ||
2d_viewport_to_world.rs | ||
bloom_2d.rs | ||
bounding_2d.rs | ||
custom_gltf_vertex_attribute.rs | ||
mesh2d.rs | ||
mesh2d_manual.rs | ||
mesh2d_vertex_color_texture.rs | ||
move_sprite.rs | ||
pixel_grid_snap.rs | ||
rotation.rs | ||
sprite.rs | ||
sprite_animation.rs | ||
sprite_flipping.rs | ||
sprite_sheet.rs | ||
sprite_slice.rs | ||
sprite_tile.rs | ||
text2d.rs | ||
texture_atlas.rs | ||
transparency_2d.rs | ||
wireframe_2d.rs |