pub fn draw_array(
        &mut self,
        cx: &Context,
        pass: &mut ArenaRenderPass,
        mesh: &Mesh,
        texture: &Texture,
        array: &DrawArray<BatchDraw>,
    ) {
        let storage_group = self.storage_binds.get(
            cx,
            array.id(),
            &wgpu::BindGroupDescriptor {
                label: None,
                layout: &self.storage_layout,
                entries: &[wgpu::BindGroupEntry {
                    binding: 0,
                    resource: wgpu::BindingResource::Buffer(wgpu::BufferBinding {
                        buffer: array.buffer(),
                        offset: 0,
                        size: None,
                    }),
                }],
            },
        );

        let texture_group = self.texture_binds.get(
            cx,
            texture.id(),
            &wgpu::BindGroupDescriptor {
                label: None,
                layout: &self.texture_layout,
                entries: &[wgpu::BindGroupEntry {
                    binding: 0,
                    resource: wgpu::BindingResource::TextureView(&texture.view),
                }],
            },
        );

        pass.set_bind_group(self.storage_slot, storage_group, &[]);
        pass.set_bind_group(self.texture_slot, texture_group, &[]);

        pass.set_vertex_buffer(0, mesh.vertices.clone(), 0);
        pass.set_index_buffer(mesh.indices.clone(), 0, wgpu::IndexFormat::Uint32);

        pass.draw_indexed(0..mesh.index_count as u32, 0, 0..array.len() as u32);
    }
/// Functions identically to [BatchRenderer::draw], except the
/// draw data is read from a [DrawArray].
///
/// This is generally far more preferable in terms of temporal performance.
Functions identically to [BatchRenderer::draw], except the
draw data is read from a [DrawArray].

This is generally far more preferable in terms of temporal performance.
Functions identically to [ BatchRenderer :: draw ] except the draw data is read from a [ DrawArray ] . This is generally far more preferable in terms of temporal performance .
pub fn draw_array(
        &mut self,
        cx: &Context,
        pass: &mut ArenaRenderPass,
        mesh: &Mesh,
        texture: &Texture,
        array: &DrawArray<BatchDraw>,
    ) {
        let storage_group = self.storage_binds.get(
            cx,
            array.id(),
            &wgpu::BindGroupDescriptor {
                label: None,
                layout: &self.storage_layout,
                entries: &[wgpu::BindGroupEntry {
                    binding: 0,
                    resource: wgpu::BindingResource::Buffer(wgpu::BufferBinding {
                        buffer: array.buffer(),
                        offset: 0,
                        size: None,
                    }),
                }],
            },
        );
        let texture_group = self.texture_binds.get(
            cx,
            texture.id(),
            &wgpu::BindGroupDescriptor {
                label: None,
                layout: &self.texture_layout,
                entries: &[wgpu::BindGroupEntry {
                    binding: 0,
                    resource: wgpu::BindingResource::TextureView(&texture.view),
                }],
            },
        );
        pass.set_bind_group(self.storage_slot, storage_group, &[]);
        pass.set_bind_group(self.texture_slot, texture_group, &[]);
        pass.set_vertex_buffer(0, mesh.vertices.clone(), 0);
        pass.set_index_buffer(mesh.indices.clone(), 0, wgpu::IndexFormat::Uint32);
        pass.draw_indexed(0..mesh.index_count as u32, 0, 0..array.len() as u32);
    }
pub fn draw_array ( & mut self , cx : & Context , pass : & mut ArenaRenderPass , mesh : & Mesh , texture : & Texture , array : & DrawArray < BatchDraw > , ) { let storage_group = self . storage_binds . get ( cx , array . id ( ) , & wgpu :: BindGroupDescriptor { label : None , layout : & self . storage_layout , entries : & [ wgpu :: BindGroupEntry { binding : 0 , resource : wgpu :: BindingResource :: Buffer ( wgpu :: BufferBinding { buffer : array . buffer ( ) , offset : 0 , size : None , } ) , } ] , } , ) ; let texture_group = self . texture_binds . get ( cx , texture . id ( ) , & wgpu :: BindGroupDescriptor { label : None , layout : & self . texture_layout , entries : & [ wgpu :: BindGroupEntry { binding : 0 , resource : wgpu :: BindingResource :: TextureView ( & texture . view ) , } ] , } , ) ; pass . set_bind_group ( self . storage_slot , storage_group , & [ ] ) ; pass . set_bind_group ( self . texture_slot , texture_group , & [ ] ) ; pass . set_vertex_buffer ( 0 , mesh . vertices . clone ( ) , 0 ) ; pass . set_index_buffer ( mesh . indices . clone ( ) , 0 , wgpu :: IndexFormat :: Uint32 ) ; pass . draw_indexed ( 0 .. mesh . index_count as u32 , 0 , 0 .. array . len ( ) as u32 ) ; }
Functions identically to [BatchRenderer::draw], except the
draw data is read from a [DrawArray].
Functions identically to [ BatchRenderer :: draw ] except the draw data is read from a [ DrawArray ] .
&mut self
cx
&Context
pass
&mut ArenaRenderPass
mesh
&Mesh
texture
&Texture
array
&DrawArray<BatchDraw>
&mut self
cx
&Context
pass
&mut ArenaRenderPass
mesh
&Mesh
texture
&Texture
array
&DrawArray<BatchDraw>