Struct sdl2::render::Texture[src]

pub struct Texture {
    pub raw: *SDL_Texture,
    pub owned: bool,
}

Fields

raw
owned

Methods

impl Texture

fn query(&self) -> Result<TextureQuery, ~str>

fn set_color_mod(&self, red: u8, green: u8, blue: u8) -> Result<(), ~str>

fn get_color_mod(&self) -> Result<(u8, u8, u8), ~str>

fn set_alpha_mod(&self, alpha: u8) -> Result<(), ~str>

fn get_alpha_mod(&self) -> Result<u8, ~str>

fn set_blend_mode(&self, blend: BlendMode) -> Result<(), ~str>

fn get_blend_mode(&self) -> Result<BlendMode, ~str>

fn update(&self, rect: Option<Rect>, pixel_data: &[u8], pitch: int) -> Result<(), ~str>

fn lock(&self, rect: Option<Rect>) -> Result<CVec<u8>, ~str>

fn unlock(&self)

fn gl_bind_texture(&self) -> Result<(f64, f64), ~str>

fn gl_unbind_texture(&self) -> bool

fn gl_with_bind<R>(&self, f: |tex_w: f64, tex_h: f64| -> R) -> R

Trait Implementations

impl Drop for Texture

fn drop(&mut self)

Derived Implementations

impl Eq for Texture

fn eq(&self, __arg_0: &Texture) -> bool

fn ne(&self, __arg_0: &Texture) -> bool