pub fn instance(&self, bindings: &[Binding]) -> Self {
        let bind_group = self
            .gpu
            .device
            .create_bind_group(&wgpu::BindGroupDescriptor {
                label: None,
                layout: &self.layout,
                entries: bindings
                    .iter()
                    .enumerate()
                    .map(|(i, b)| BindGroupEntry {
                        binding: i as _,
                        resource: b.resource.clone(),
                    })
                    .collect::<Vec<_>>()
                    .as_slice(),
            });

        BindGroup {
            gpu: self.gpu.clone(),
            layout: self.layout.clone(),
            inner: bind_group,
        }
    }
// Creates a new bind group with the same layout as this one, but with the given bindings.
Creates a new bind group with the same layout as this one, but with the given bindings.
Creates a new bind group with the same layout as this one but with the given bindings .
pub fn instance(&self, bindings: &[Binding]) -> Self {
        let bind_group = self
            .gpu
            .device
            .create_bind_group(&wgpu::BindGroupDescriptor {
                label: None,
                layout: &self.layout,
                entries: bindings
                    .iter()
                    .enumerate()
                    .map(|(i, b)| BindGroupEntry {
                        binding: i as _,
                        resource: b.resource.clone(),
                    })
                    .collect::<Vec<_>>()
                    .as_slice(),
            });
        BindGroup {
            gpu: self.gpu.clone(),
            layout: self.layout.clone(),
            inner: bind_group,
        }
    }
pub fn instance ( & self , bindings : & [ Binding ] ) -> Self { let bind_group = self . gpu . device . create_bind_group ( & wgpu :: BindGroupDescriptor { label : None , layout : & self . layout , entries : bindings . iter ( ) . enumerate ( ) . map ( | ( i , b ) | BindGroupEntry { binding : i as _ , resource : b . resource . clone ( ) , } ) . collect :: < Vec < _ > > ( ) . as_slice ( ) , } ) ; BindGroup { gpu : self . gpu . clone ( ) , layout : self . layout . clone ( ) , inner : bind_group , } }
Creates a new bind group with the same layout as this one, but with the given bindings.
Creates a new bind group with the same layout as this one but with the given bindings .
&self
bindings
&[Binding]
&self
bindings
&[Binding]