Struct adi_screen::Texture [−][src]
pub struct Texture(_, _, _);
A reference to an image in GPU memory.
Methods
impl Texture
[src]
impl Texture
pub fn empty(window: &mut Window, w: u32, h: u32) -> Texture
[src]
pub fn empty(window: &mut Window, w: u32, h: u32) -> Texture
Load an empty texture into gpu memory.
pub fn new_vec<F>(
window: &mut Window,
loader: F,
files: &[&[u8]]
) -> Result<Vec<Texture>, GraphicDecodeErr> where
F: Fn(&[u8]) -> Result<Graphic, GraphicDecodeErr>,
[src]
pub fn new_vec<F>(
window: &mut Window,
loader: F,
files: &[&[u8]]
) -> Result<Vec<Texture>, GraphicDecodeErr> where
F: Fn(&[u8]) -> Result<Graphic, GraphicDecodeErr>,
Load multiple texture from graphic data into gpu memory.
pub fn wh(&self) -> (u32, u32)
[src]
pub fn wh(&self) -> (u32, u32)
Get the width and height of the texture.
pub fn set(&mut self, window: &mut Window, data: &[u32])
[src]
pub fn set(&mut self, window: &mut Window, data: &[u32])
Set the pixels for the texture.