pub fn encode_render_pass(
        &self,
        dst_texture: &wgpu::TextureViewHandle,
        encoder: &mut wgpu::CommandEncoder,
    ) {
        let mut render_pass = wgpu::RenderPassBuilder::new()
            .color_attachment(dst_texture, |color| color)
            .begin(encoder);
        render_pass.set_pipeline(&self.render_pipeline);
        render_pass.set_vertex_buffers(0, &[(&self.vertex_buffer, 0)]);
        render_pass.set_bind_group(0, &self.bind_group, &[]);
        let vertex_range = 0..VERTICES.len() as u32;
        let instance_range = 0..1;
        render_pass.draw(vertex_range, instance_range);
    }
/// Given an encoder, submits a render pass command for writing the source texture to the
/// destination texture.
Given an encoder, submits a render pass command for writing the source texture to the
destination texture.
Given an encoder submits a render pass command for writing the source texture to the destination texture .
pub fn encode_render_pass(
        &self,
        dst_texture: &wgpu::TextureViewHandle,
        encoder: &mut wgpu::CommandEncoder,
    ) {
        let mut render_pass = wgpu::RenderPassBuilder::new()
            .color_attachment(dst_texture, |color| color)
            .begin(encoder);
        render_pass.set_pipeline(&self.render_pipeline);
        render_pass.set_vertex_buffers(0, &[(&self.vertex_buffer, 0)]);
        render_pass.set_bind_group(0, &self.bind_group, &[]);
        let vertex_range = 0..VERTICES.len() as u32;
        let instance_range = 0..1;
        render_pass.draw(vertex_range, instance_range);
    }
pub fn encode_render_pass ( & self , dst_texture : & wgpu :: TextureViewHandle , encoder : & mut wgpu :: CommandEncoder , ) { let mut render_pass = wgpu :: RenderPassBuilder :: new ( ) . color_attachment ( dst_texture , | color | color ) . begin ( encoder ) ; render_pass . set_pipeline ( & self . render_pipeline ) ; render_pass . set_vertex_buffers ( 0 , & [ ( & self . vertex_buffer , 0 ) ] ) ; render_pass . set_bind_group ( 0 , & self . bind_group , & [ ] ) ; let vertex_range = 0 .. VERTICES . len ( ) as u32 ; let instance_range = 0 .. 1 ; render_pass . draw ( vertex_range , instance_range ) ; }
Given an encoder, submits a render pass command for writing the source texture to the
destination texture.
Given an encoder submits a render pass command for writing the source texture to the destination texture .
&self
dst_texture
&wgpu::TextureViewHandle
encoder
&mut wgpu::CommandEncoder
&self
dst_texture
&wgpu::TextureViewHandle
encoder
&mut wgpu::CommandEncoder