Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
IceSentry committed Jun 16, 2023
1 parent 968c78e commit 11c7075
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/bevy_render/src/picking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ impl GpuPickingCameraBuffers {
#[derive(Resource)]
pub struct VisibleMeshEntities(pub Option<Vec<Entity>>);

/// Sends the mesh id buffer to the main world
fn send_buffer(
query: Query<&ExtractedGpuPickingCamera>,
render_device: Res<RenderDevice>,
Expand Down Expand Up @@ -301,9 +302,9 @@ fn send_buffer(
}
}

/// Receives the entity buffer from the render world through an async channel
fn receive_buffer(mut q: Query<&mut GpuPickingCamera>) {
for mut cam in &mut q {
/// Receives the mesh id buffer from the render world
fn receive_buffer(mut cameras: Query<&mut GpuPickingCamera>) {
for mut cam in &mut cameras {
let (_, receiver) = cam.data_channel.clone();
let Ok(data) = receiver.try_recv() else { continue; };
cam.data = data;
Expand Down

0 comments on commit 11c7075

Please sign in to comment.