Struct simple_wgpu::CommandEncoder
source · pub struct CommandEncoder { /* private fields */ }
Expand description
Encodes a series of GPU operations
Accumulates render passes, compute passes, and GPU transfer commands. No work is submitted to the GPU until the command encoder is dropped.
This is more or less the equivalent to wgpu::CommandEncoder
Implementations§
source§impl CommandEncoder
impl CommandEncoder
pub fn new(label: Option<&str>, context: &Context) -> Self
sourcepub fn compute_pass(&mut self, label: Option<&str>) -> ComputePass<'_>
pub fn compute_pass(&mut self, label: Option<&str>) -> ComputePass<'_>
Begin a ComputePass
sourcepub fn render_pass(
&mut self,
label: Option<&str>,
color_attachments: Vec<ColorAttachment>,
depth_stencil_attachment: Option<DepthStencilAttachment>,
multisample: Option<MultisampleState>
) -> RenderPass<'_>
pub fn render_pass( &mut self, label: Option<&str>, color_attachments: Vec<ColorAttachment>, depth_stencil_attachment: Option<DepthStencilAttachment>, multisample: Option<MultisampleState> ) -> RenderPass<'_>
Begin a RenderPass