Struct gfx_texture::Texture
[−]
[src]
pub struct Texture<R> where R: Resources {
// some fields omitted
}Represents a texture.
Methods
impl<R: Resources> Texture<R>
fn handle(&self) -> Texture<R>
Gets a handle to the Gfx texture.
fn empty<F>(factory: &mut F) -> Result<Self, TextureError> where F: Factory<R>
Returns empty texture.
fn from_path<F, P>(factory: &mut F, path: P, settings: &Settings) -> Result<Self, String> where F: Factory<R>, P: AsRef<Path>
Creates a texture from path.
fn from_image<F>(factory: &mut F, image: &RgbaImage, convert_gamma: bool, _compress: bool, generate_mipmap: bool) -> Self where F: Factory<R>
Creates a texture from image.
fn from_memory_alpha<F>(factory: &mut F, buffer: &[u8], width: u32, height: u32) -> Self where F: Factory<R>
Creates texture from memory alpha.
fn update<F>(&mut self, factory: &mut F, image: &RgbaImage) where F: Factory<R>
Updates the texture with an image.