pub fn bind_sampler<'a>(
        &mut self,
        cx: &Context,
        pass: &'a mut wgpu::RenderPass,
        sampler: &Sampler,
    ) {
        let group = self.sampler_binds.get(
            cx,
            sampler.id(),
            &wgpu::BindGroupDescriptor {
                label: None,
                layout: &self.sampler_layout,
                entries: &[wgpu::BindGroupEntry {
                    binding: 0,
                    resource: wgpu::BindingResource::Sampler(&sampler.sampler),
                }],
            },
        );

        pass.set_bind_group(
            self.sampler_slot,
            unsafe { &*(group.as_ref() as *const _) },
            &[],
        );
    }
/// Binds a sampler for use with the proceeding draw calls.
Binds a sampler for use with the proceeding draw calls.
Binds a sampler for use with the proceeding draw calls .
pub fn bind_sampler<'a>(
        &mut self,
        cx: &Context,
        pass: &'a mut wgpu::RenderPass,
        sampler: &Sampler,
    ) {
        let group = self.sampler_binds.get(
            cx,
            sampler.id(),
            &wgpu::BindGroupDescriptor {
                label: None,
                layout: &self.sampler_layout,
                entries: &[wgpu::BindGroupEntry {
                    binding: 0,
                    resource: wgpu::BindingResource::Sampler(&sampler.sampler),
                }],
            },
        );
        pass.set_bind_group(
            self.sampler_slot,
            unsafe { &*(group.as_ref() as *const _) },
            &[],
        );
    }
pub fn bind_sampler < ' a > ( & mut self , cx : & Context , pass : & ' a mut wgpu :: RenderPass , sampler : & Sampler , ) { let group = self . sampler_binds . get ( cx , sampler . id ( ) , & wgpu :: BindGroupDescriptor { label : None , layout : & self . sampler_layout , entries : & [ wgpu :: BindGroupEntry { binding : 0 , resource : wgpu :: BindingResource :: Sampler ( & sampler . sampler ) , } ] , } , ) ; pass . set_bind_group ( self . sampler_slot , unsafe { & * ( group . as_ref ( ) as * const _ ) } , & [ ] , ) ; }
Binds a sampler for use with the proceeding draw calls.
Binds a sampler for use with the proceeding draw calls .
&mut self
cx
&Context
pass
&'a mut wgpu::RenderPass
sampler
&Sampler
&mut self
cx
&Context
pass
&'a mut wgpu::RenderPass
sampler
&Sampler