pub struct RenderPassBuilder { /* private fields */ }Expand description
Fluent builder for RenderPassConfig.
Implementations§
Source§impl RenderPassBuilder
impl RenderPassBuilder
Sourcepub fn add_color_attachment(self, attachment: AttachmentConfig) -> Self
pub fn add_color_attachment(self, attachment: AttachmentConfig) -> Self
Appends a color attachment.
Sourcepub fn set_depth_attachment(
self,
attachment: AttachmentConfig,
) -> Result<Self, String>
pub fn set_depth_attachment( self, attachment: AttachmentConfig, ) -> Result<Self, String>
Sets the depth/stencil attachment.
Returns an error string if the attachment format does not contain depth.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Sets a debug label for the render pass.
Sourcepub fn build(self) -> Result<RenderPassConfig, String>
pub fn build(self) -> Result<RenderPassConfig, String>
Consumes the builder and returns the RenderPassConfig.
Returns an error if no color attachments have been added.
Trait Implementations§
Source§impl Debug for RenderPassBuilder
impl Debug for RenderPassBuilder
Source§impl Default for RenderPassBuilder
impl Default for RenderPassBuilder
Source§fn default() -> RenderPassBuilder
fn default() -> RenderPassBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RenderPassBuilder
impl RefUnwindSafe for RenderPassBuilder
impl Send for RenderPassBuilder
impl Sync for RenderPassBuilder
impl Unpin for RenderPassBuilder
impl UnsafeUnpin for RenderPassBuilder
impl UnwindSafe for RenderPassBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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