pub struct ViewId(/* private fields */);Expand description
Names one camera a ForwardRenderer draws.
ViewId::PRIMARY is the camera ForwardRenderer::begin_frame opens and
always exists. Every other id comes from ForwardRenderer::create_view
and stays valid until ForwardRenderer::destroy_view hands it back, after
which the renderer may give the same id to the next view it creates.
Implementations§
Source§impl ViewId
impl ViewId
Sourcepub const PRIMARY: Self
pub const PRIMARY: Self
The camera ForwardRenderer::begin_frame opens, and the one
ForwardRenderer::add_passes draws into the caller’s target.
Sourcepub const fn index(self) -> usize
pub const fn index(self) -> usize
This view’s index: 0 for ViewId::PRIMARY, and below MAX_VIEWS
for every other.
Trait Implementations§
impl Copy for ViewId
impl Eq for ViewId
impl StructuralPartialEq for ViewId
Auto Trait Implementations§
impl Forget for ViewId
impl Freeze for ViewId
impl RefUnwindSafe for ViewId
impl Send for ViewId
impl Sync for ViewId
impl Unpin for ViewId
impl UnsafeUnpin for ViewId
impl UnwindSafe for ViewId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more