pub struct AttachmentConfig {
pub format: AttachmentFormat,
pub load_op: LoadOp,
pub store_op: StoreOp,
pub sample_count: u32,
pub label: Option<String>,
}Expand description
Configuration for a single attachment within a render pass.
Fields§
§format: AttachmentFormatPixel format.
load_op: LoadOpOperation at the start of the pass.
store_op: StoreOpOperation at the end of the pass.
sample_count: u32Optional MSAA sample count (1 = no MSAA).
label: Option<String>Debug label.
Implementations§
Source§impl AttachmentConfig
impl AttachmentConfig
Sourcepub fn new(format: AttachmentFormat, load_op: LoadOp, store_op: StoreOp) -> Self
pub fn new(format: AttachmentFormat, load_op: LoadOp, store_op: StoreOp) -> Self
Creates an attachment configuration.
Sourcepub fn has_depth(&self) -> bool
pub fn has_depth(&self) -> bool
Returns true when this attachment is a depth (or depth/stencil) attachment.
Sourcepub fn is_multisampled(&self) -> bool
pub fn is_multisampled(&self) -> bool
Returns true when MSAA is enabled (sample count > 1).
Sourcepub fn with_sample_count(self, count: u32) -> Self
pub fn with_sample_count(self, count: u32) -> Self
Sets the MSAA sample count.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Attaches a debug label.
Trait Implementations§
Source§impl Clone for AttachmentConfig
impl Clone for AttachmentConfig
Source§fn clone(&self) -> AttachmentConfig
fn clone(&self) -> AttachmentConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AttachmentConfig
impl RefUnwindSafe for AttachmentConfig
impl Send for AttachmentConfig
impl Sync for AttachmentConfig
impl Unpin for AttachmentConfig
impl UnsafeUnpin for AttachmentConfig
impl UnwindSafe for AttachmentConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more