Skip to main content

CreateTexture

Trait CreateTexture 

Source
pub trait CreateTexture<F>:
    TextureOp<F>
    + ImageSize
    + Sized {
    // Required method
    fn create<S: Into<[u32; 2]>>(
        factory: &mut F,
        format: Format,
        memory: &[u8],
        size: S,
        settings: &TextureSettings,
    ) -> Result<Self, Self::Error>;
}
Expand description

Implemented by textures for creation.

Required Methods§

Source

fn create<S: Into<[u32; 2]>>( factory: &mut F, format: Format, memory: &[u8], size: S, settings: &TextureSettings, ) -> Result<Self, Self::Error>

Create texture from memory.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§