pub enum ColorTarget<'a, F: FrameOperations + ?Sized> {
Default {
clear: Option<[f32; 4]>,
},
Custom {
attachment: &'a F::Attachment,
clear: Option<[f32; 4]>,
},
}Expand description
Specifies a color attachment for a render pass.
Variants§
Default
Use the backend’s default surface attachment.
Custom
Use a custom attachment (e.g. an off-screen texture).
Implementations§
Source§impl<'a, F: FrameOperations> ColorTarget<'a, F>
impl<'a, F: FrameOperations> ColorTarget<'a, F>
Sourcepub fn default_load() -> Self
pub fn default_load() -> Self
Default attachment, loading existing contents (no clear).
Sourcepub fn custom(attachment: &'a F::Attachment, clear: [f32; 4]) -> Self
pub fn custom(attachment: &'a F::Attachment, clear: [f32; 4]) -> Self
Custom attachment, cleared to clear.
Sourcepub fn custom_load(attachment: &'a F::Attachment) -> Self
pub fn custom_load(attachment: &'a F::Attachment) -> Self
Custom attachment, loading existing contents (no clear).
Auto Trait Implementations§
impl<'a, F> Freeze for ColorTarget<'a, F>where
F: ?Sized,
impl<'a, F> RefUnwindSafe for ColorTarget<'a, F>
impl<'a, F> Send for ColorTarget<'a, F>
impl<'a, F> Sync for ColorTarget<'a, F>
impl<'a, F> Unpin for ColorTarget<'a, F>where
F: ?Sized,
impl<'a, F> UnsafeUnpin for ColorTarget<'a, F>where
F: ?Sized,
impl<'a, F> UnwindSafe for ColorTarget<'a, F>
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