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 TextureViewHandle,
color_builder: F
) -> Self
pub fn color_attachment<F>( self, attachment: &'a TextureViewHandle, color_builder: F ) -> Self
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 TextureViewHandle,
depth_stencil_builder: F
) -> Selfwhere
F: FnOnce(DepthStencilAttachmentDescriptorBuilder<'a>) -> DepthStencilAttachmentDescriptorBuilder<'a>,
pub fn depth_stencil_attachment<F>(
self,
attachment: &'a TextureViewHandle,
depth_stencil_builder: F
) -> Selfwhere
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<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