[−][src]Trait sdl2::image::LoadTexture
Method extensions for creating Textures from a TextureCreator
Required methods
fn load_texture<P: AsRef<Path>>(
&self,
filename: P
) -> Result<Texture<'_>, String>
&self,
filename: P
) -> Result<Texture<'_>, String>
fn load_texture_bytes(&self, buf: &[u8]) -> Result<Texture<'_>, String>
Implementors
impl<T> LoadTexture for TextureCreator<T>
[src]
fn load_texture<P: AsRef<Path>>(
&self,
filename: P
) -> Result<Texture<'_>, String>
[src]
&self,
filename: P
) -> Result<Texture<'_>, String>
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)