Skip to main content

TextureUploader

Trait TextureUploader 

Source
pub trait TextureUploader {
    // Required methods
    fn upload_texture_rgba8(
        &mut self,
        rgba: &[u8],
        width: u32,
        height: u32,
    ) -> Result<TextureHandle, Box<dyn Error>>;
    fn upload_texture_bc7(
        &mut self,
        bc7_blocks: &[u8],
        width: u32,
        height: u32,
        srgb: bool,
    ) -> Result<TextureHandle, Box<dyn Error>>;
}
Expand description

Trait for uploading decoded textures to the GPU.

Textures are provided as RGBA8 pixels.

Required Methods§

Source

fn upload_texture_rgba8( &mut self, rgba: &[u8], width: u32, height: u32, ) -> Result<TextureHandle, Box<dyn Error>>

Source

fn upload_texture_bc7( &mut self, bc7_blocks: &[u8], width: u32, height: u32, srgb: bool, ) -> Result<TextureHandle, Box<dyn Error>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§