[][src]Trait sdl2::image::LoadTexture

pub trait LoadTexture {
    fn load_texture<P: AsRef<Path>>(
        &self,
        filename: P
    ) -> Result<Texture, String>;
fn load_texture_bytes(&self, buf: &[u8]) -> Result<Texture, String>; }

Method extensions for creating Textures from a TextureCreator

Required methods

fn load_texture<P: AsRef<Path>>(&self, filename: P) -> Result<Texture, String>

fn load_texture_bytes(&self, buf: &[u8]) -> Result<Texture, String>

Loading content...

Implementors

impl<T> LoadTexture for TextureCreator<T>[src]

fn load_texture<P: AsRef<Path>>(&self, filename: P) -> Result<Texture, String>[src]

Loads an SDL Texture from a file

fn load_texture_bytes(&self, buf: &[u8]) -> Result<Texture, String>[src]

Loads an SDL Texture from a buffer that the format must be something supported by SDL2_image (png, jpeg, ect, but NOT RGBA8888 bytes for instance)

Loading content...