pub fn create_empty<D>(mut self, size: D) -> crate::Texture<D>
    where
        D: crate::TextureDimensions,
    {
        self.texture.usage |= wgpu::TextureUsages::COPY_DST;
        self.texture.size = size.as_extent();
        self.texture.dimension = size.dim();

        let texture = self.gpu.device.create_texture(&self.texture);
        let view = texture.create_view(&self.view);

        crate::Texture {
            gpu: self.gpu,
            inner: texture,
            view,
            format: self.texture.format,
            size,
            usage: self.texture.usage,
        }
    }
/// Creates the texture with a given size, and filled with 0.
Creates the texture with a given size, and filled with 0.
Creates the texture with a given size and filled with 0 .
pub fn create_empty<D>(mut self, size: D) -> crate::Texture<D>
    where
        D: crate::TextureDimensions,
    {
        self.texture.usage |= wgpu::TextureUsages::COPY_DST;
        self.texture.size = size.as_extent();
        self.texture.dimension = size.dim();
        let texture = self.gpu.device.create_texture(&self.texture);
        let view = texture.create_view(&self.view);
        crate::Texture {
            gpu: self.gpu,
            inner: texture,
            view,
            format: self.texture.format,
            size,
            usage: self.texture.usage,
        }
    }
pub fn create_empty < D > ( mut self , size : D ) -> crate :: Texture < D > where D : crate :: TextureDimensions , { self . texture . usage |= wgpu :: TextureUsages :: COPY_DST ; self . texture . size = size . as_extent ( ) ; self . texture . dimension = size . dim ( ) ; let texture = self . gpu . device . create_texture ( & self . texture ) ; let view = texture . create_view ( & self . view ) ; crate :: Texture { gpu : self . gpu , inner : texture , view , format : self . texture . format , size , usage : self . texture . usage , } }
Creates the texture with a given size, and filled with 0.
Creates the texture with a given size and filled with 0 .
mut self
size
D
mut self
size
D