bevy/crates/bevy_render/src
Vic 5b899dcc3a
impl EntityBorrow for more types (#16917)
# Objective

Some types like `RenderEntity` and `MainEntity` are just wrappers around
`Entity`, so they should be able to implement
`EntityBorrow`/`TrustedEntityBorrow`. This allows using them with
`EntitySet` functionality.
The `EntityRef` family are more than direct wrappers around `Entity`,
but can still benefit from being unique in a collection.

## Solution

Implement `EntityBorrow` and `TrustedEntityBorrow` for simple `Entity`
newtypes and `EntityRef` types.
These impls are an explicit decision to have the `EntityRef` types
compare like just `Entity`.
`EntityWorldMut` is omitted from this impl, because it explicitly
contains a `&mut World` as well, and we do not ever use more than one at
a time.

Add `EntityBorrow` to the `bevy_ecs` prelude.

## Migration Guide

`NormalizedWindowRef::entity` has been replaced with an
`EntityBorrow::entity` impl.
2024-12-24 02:47:03 +00:00
..
batching Fix several regressions from recent rendering changes. (#16890) 2024-12-22 23:03:06 +00:00
camera impl EntityBorrow for more types (#16917) 2024-12-24 02:47:03 +00:00
diagnostic
mesh Remove the type parameter from check_visibility, and only invoke it once. (#16812) 2024-12-17 04:43:45 +00:00
primitives Add .contains_aabb for Frustum (#16022) 2024-12-01 21:30:01 +00:00
render_graph Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
render_phase track_change_detection: Also track spawns/despawns (#16047) 2024-12-17 04:46:31 +00:00
render_resource Implement bindless lightmaps. (#16653) 2024-12-16 23:37:06 +00:00
renderer Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
texture Change GpuImage::size from UVec2 to Extent3d (#16815) 2024-12-17 19:08:09 +00:00
view Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
alpha.rs
color_operations.wgsl
extract_component.rs
extract_instances.rs
extract_param.rs
extract_resource.rs
globals.rs Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
globals.wgsl
gpu_component_array_buffer.rs
gpu_readback.rs Change GpuImage::size from UVec2 to Extent3d (#16815) 2024-12-17 19:08:09 +00:00
lib.rs Fix several regressions from recent rendering changes. (#16890) 2024-12-22 23:03:06 +00:00
maths.wgsl
pipelined_rendering.rs
render_asset.rs Update hashbrown to 0.15 (#15801) 2024-12-10 19:45:50 +00:00
settings.rs cleanup bevy_render/lib.rs (#16481) 2024-11-22 22:32:04 +00:00
spatial_bundle.rs
storage.rs Add a bindless mode to AsBindGroup. (#16368) 2024-12-03 18:00:34 +00:00
sync_component.rs
sync_world.rs impl EntityBorrow for more types (#16917) 2024-12-24 02:47:03 +00:00