pub struct GpuRenderPass<'a> { /* private fields */ }Expand description
A render pass — encodes draw commands for the GPU.
Implementations§
Source§impl<'a> GpuRenderPass<'a>
impl<'a> GpuRenderPass<'a>
Sourcepub fn set_pipeline(&mut self, pipeline: &'a GpuRenderPipeline)
pub fn set_pipeline(&mut self, pipeline: &'a GpuRenderPipeline)
Set the active render pipeline.
Sourcepub fn set_bind_group(
&mut self,
index: u32,
bind_group: &'a GpuBindGroup,
offsets: &[u32],
)
pub fn set_bind_group( &mut self, index: u32, bind_group: &'a GpuBindGroup, offsets: &[u32], )
Set a bind group.
Sourcepub fn set_vertex_buffer(&mut self, slot: u32, buffer: &'a GpuBuffer)
pub fn set_vertex_buffer(&mut self, slot: u32, buffer: &'a GpuBuffer)
Set a vertex buffer.
Sourcepub fn set_vertex_buffer_range(
&mut self,
slot: u32,
buffer_slice: BufferSlice<'a>,
)
pub fn set_vertex_buffer_range( &mut self, slot: u32, buffer_slice: BufferSlice<'a>, )
Set vertex buffer with a custom range.
Sourcepub fn set_index_buffer(&mut self, buffer: &'a GpuBuffer, format: IndexFormat)
pub fn set_index_buffer(&mut self, buffer: &'a GpuBuffer, format: IndexFormat)
Set the index buffer.
Sourcepub fn set_index_buffer_range(
&mut self,
buffer_slice: BufferSlice<'a>,
format: IndexFormat,
)
pub fn set_index_buffer_range( &mut self, buffer_slice: BufferSlice<'a>, format: IndexFormat, )
Set index buffer with a custom range.
Sourcepub fn draw_indexed(
&mut self,
indices: Range<u32>,
base_vertex: i32,
instances: Range<u32>,
)
pub fn draw_indexed( &mut self, indices: Range<u32>, base_vertex: i32, instances: Range<u32>, )
Draw indexed primitives.
Sourcepub fn draw_indirect(&mut self, buffer: &'a GpuBuffer, offset: BufferAddress)
pub fn draw_indirect(&mut self, buffer: &'a GpuBuffer, offset: BufferAddress)
Draw indirect (GPU-driven rendering).
Sourcepub fn draw_indexed_indirect(
&mut self,
buffer: &'a GpuBuffer,
offset: BufferAddress,
)
pub fn draw_indexed_indirect( &mut self, buffer: &'a GpuBuffer, offset: BufferAddress, )
Draw indexed-indirect.
Sourcepub fn set_viewport(
&mut self,
x: f32,
y: f32,
w: f32,
h: f32,
min_depth: f32,
max_depth: f32,
)
pub fn set_viewport( &mut self, x: f32, y: f32, w: f32, h: f32, min_depth: f32, max_depth: f32, )
Set the viewport.
Sourcepub fn set_stencil_reference(&mut self, reference: u32)
pub fn set_stencil_reference(&mut self, reference: u32)
Set the stencil reference value.
Sourcepub fn set_blend_constant(&mut self, color: Color)
pub fn set_blend_constant(&mut self, color: Color)
Set the blend constant.
Sourcepub fn set_push_constants(
&mut self,
stages: ShaderStages,
offset: u32,
data: &[u8],
)
pub fn set_push_constants( &mut self, stages: ShaderStages, offset: u32, data: &[u8], )
Set push constants.
Sourcepub fn raw(&self) -> &RenderPass<'a>
pub fn raw(&self) -> &RenderPass<'a>
Access the underlying wgpu render pass.
Sourcepub fn raw_mut(&mut self) -> &mut RenderPass<'a>
pub fn raw_mut(&mut self) -> &mut RenderPass<'a>
Access the underlying wgpu render pass mutably.
Auto Trait Implementations§
impl<'a> Freeze for GpuRenderPass<'a>
impl<'a> !RefUnwindSafe for GpuRenderPass<'a>
impl<'a> Send for GpuRenderPass<'a>
impl<'a> Sync for GpuRenderPass<'a>
impl<'a> Unpin for GpuRenderPass<'a>
impl<'a> UnsafeUnpin for GpuRenderPass<'a>
impl<'a> !UnwindSafe for GpuRenderPass<'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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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