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§
Sourcefn generate(
&self,
device: &Device,
encoder: &mut CommandEncoder,
texture: &Texture,
texture_descriptor: &TextureDescriptor<'_>,
) -> Result<(), Error>
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_descriptorshould be the same descriptor used to create thetexture.