pub fn resize(&mut self, size: D) {
        let new_texture = self.gpu.create_texture(&wgpu::TextureDescriptor {
            // TODO: update label for texture on resize
            label: None,
            size: size.as_extent(),
            // TODO: mip level count on resize??
            mip_level_count: 1,
            sample_count: 1,
            dimension: size.dim(),
            format: self.format,
            usage: self.usage,
        });

        // Create a new view
        let view = new_texture.create_view(&Default::default());

        self.inner = new_texture;
        self.size = size;
        self.view = view;
    }
/// Resize the texture. Old contents are discarded (see resize_and_copy)
Resize the texture. Old contents are discarded
Resize the texture . Old contents are discarded
pub fn resize(&mut self, size: D) {
        let new_texture = self.gpu.create_texture(&wgpu::TextureDescriptor {
            // TODO: update label for texture on resize
            label: None,
            size: size.as_extent(),
            // TODO: mip level count on resize??
            mip_level_count: 1,
            sample_count: 1,
            dimension: size.dim(),
            format: self.format,
            usage: self.usage,
        });
        // Create a new view
        let view = new_texture.create_view(&Default::default());
        self.inner = new_texture;
        self.size = size;
        self.view = view;
    }
pub fn resize ( & mut self , size : D ) { let new_texture = self . gpu . create_texture ( & wgpu :: TextureDescriptor { // TODO: update label for texture on resize label : None , size : size . as_extent ( ) , // TODO: mip level count on resize?? mip_level_count : 1 , sample_count : 1 , dimension : size . dim ( ) , format : self . format , usage : self . usage , } ) ; // Create a new view let view = new_texture . create_view ( & Default :: default ( ) ) ; self . inner = new_texture ; self . size = size ; self . view = view ; }
Resize the texture.
Resize the texture .
&mut self
size
D
&mut self
size
D