Struct nannou::wgpu::RenderPassBuilder
source · pub struct RenderPassBuilder<'a> { /* private fields */ }
Expand description
A builder type to simplify the process of creating a render pass descriptor.
Implementations§
source§impl<'a> Builder<'a>
impl<'a> Builder<'a>
pub const DEFAULT_COLOR_LOAD_OP: LoadOp<Color> = ColorAttachmentDescriptorBuilder::DEFAULT_LOAD_OP
pub const DEFAULT_COLOR_STORE_OP: bool = true
pub const DEFAULT_CLEAR_COLOR: Color = ColorAttachmentDescriptorBuilder::DEFAULT_CLEAR_COLOR
pub const DEFAULT_DEPTH_LOAD_OP: LoadOp<f32> = DepthStencilAttachmentDescriptorBuilder::DEFAULT_DEPTH_LOAD_OP
pub const DEFAULT_DEPTH_STORE_OP: bool = true
pub const DEFAULT_CLEAR_DEPTH: f32 = 1f32
pub const DEFAULT_STENCIL_LOAD_OP: LoadOp<u32> = DepthStencilAttachmentDescriptorBuilder::DEFAULT_STENCIL_LOAD_OP
pub const DEFAULT_STENCIL_STORE_OP: bool = true
pub const DEFAULT_CLEAR_STENCIL: u32 = 0u32
sourcepub fn color_attachment<F>(
self,
attachment: &'a TextureView,
color_builder: F
) -> Builder<'a>
pub fn color_attachment<F>( self, attachment: &'a TextureView, color_builder: F ) -> Builder<'a>
Add a single color attachment descriptor to the render pass descriptor.
Call this multiple times in succession to add multiple color attachments.
sourcepub fn depth_stencil_attachment<F>(
self,
attachment: &'a TextureView,
depth_stencil_builder: F
) -> Builder<'a>where
F: FnOnce(DepthStencilAttachmentDescriptorBuilder<'a>) -> DepthStencilAttachmentDescriptorBuilder<'a>,
pub fn depth_stencil_attachment<F>(
self,
attachment: &'a TextureView,
depth_stencil_builder: F
) -> Builder<'a>where
F: FnOnce(DepthStencilAttachmentDescriptorBuilder<'a>) -> DepthStencilAttachmentDescriptorBuilder<'a>,
Add a depth stencil attachment to the render pass.
This should only be called once, as only a single depth stencil attachment is valid. Only the attachment submitted last will be used.
sourcepub fn into_inner(
self
) -> (Vec<Option<RenderPassColorAttachment<'a>>>, Option<RenderPassDepthStencilAttachment<'a>>)
pub fn into_inner( self ) -> (Vec<Option<RenderPassColorAttachment<'a>>>, Option<RenderPassDepthStencilAttachment<'a>>)
Return the built color and depth attachments.
sourcepub fn begin(self, encoder: &'a mut CommandEncoder) -> RenderPass<'a>
pub fn begin(self, encoder: &'a mut CommandEncoder) -> RenderPass<'a>
Begin a render pass with the specified parameters on the given encoder.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Builder<'a>
impl<'a> Send for Builder<'a>
impl<'a> Sync for Builder<'a>
impl<'a> Unpin for Builder<'a>
impl<'a> !UnwindSafe for Builder<'a>
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
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, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
source§fn convert_into(self) -> U
fn convert_into(self) -> U
Convert into T with values clamped to the color defined bounds Read more
source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined range,
otherwise an
OutOfBounds
error is returned which contains the unclamped color. Read more