Skip to content

Commit

Permalink
Doc fixes, bevy_utils path fix
Browse files Browse the repository at this point in the history
Signed-off-by: Torstein Grindvik <torstein.grindvik@nordicsemi.no>
  • Loading branch information
torsteingrindvik committed Dec 21, 2022
1 parent 93e2fc8 commit 120d708
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions crates/bevy_render/src/picking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ use crate::{
view::Msaa,
};

#[cfg(feature = "trace")]
use bevy_utils::tracing::info_span;

pub fn copy_to_buffer(
camera_size: UVec2,
picking: &Picking,
Expand Down Expand Up @@ -59,8 +62,8 @@ pub fn copy_to_buffer(
);
}

/// Add this to a camera in order for the camera
/// to generate [`PickedEntityIndex`] events when the cursor hovers over entities.
/// Add this to a camera in order for the camera to also render to a buffer
/// with entity indices instead of colors.
#[derive(Component, Debug, Clone, Default)]
pub struct Picking {
pub buffer: Arc<Mutex<Option<(Buffer, PickingBufferSize)>>>,
Expand Down Expand Up @@ -140,8 +143,8 @@ impl PickingTextures {
.into()
}

/// Retrieve this target's color attachment. This will use [`Self::sampled_main_texture`] and resolve to [`Self::main_texture`] if
/// the target has sampling enabled. Otherwise it will use [`Self::main_texture`] directly.
/// Retrieve this target's color attachment. This will use [`Self::sampled`] and resolve to [`Self::main`] if
/// the target has sampling enabled. Otherwise it will use [`Self::main`] directly.
pub fn get_color_attachment(&self, ops: Operations<wgpu::Color>) -> RenderPassColorAttachment {
match &self.sampled {
Some(sampled_texture) => RenderPassColorAttachment {
Expand Down

0 comments on commit 120d708

Please sign in to comment.