MipmapGenerator

Trait MipmapGenerator 

Source
pub trait MipmapGenerator {
    // Required method
    fn generate(
        &self,
        device: &Device,
        encoder: &mut CommandEncoder,
        texture: &Texture,
        texture_descriptor: &TextureDescriptor<'_>,
    ) -> Result<(), Error>;
}
Expand description

MipmapGenerator describes types that can generate mipmaps for a texture.

Required Methods§

Source

fn generate( &self, device: &Device, encoder: &mut CommandEncoder, texture: &Texture, texture_descriptor: &TextureDescriptor<'_>, ) -> Result<(), Error>

Encodes commands to generate mipmaps for a texture.

Expectations:

  • texture_descriptor should be the same descriptor used to create the texture.

Implementors§