pub struct Texture2D(/* private fields */);Implementations§
Trait Implementations§
Source§impl RaylibTexture2D for Texture2D
impl RaylibTexture2D for Texture2D
fn width(&self) -> i32
fn height(&self) -> i32
fn mipmaps(&self) -> i32
fn format(&self) -> i32
Source§fn update_texture(&mut self, pixels: &[u8])
fn update_texture(&mut self, pixels: &[u8])
Updates GPU texture with new data.
Source§fn get_texture_data(&self) -> Result<Image, String>
fn get_texture_data(&self) -> Result<Image, String>
Gets pixel data from GPU texture and returns an
Image.
Fairly sure this would never fail. If it does wrap in result.Source§fn gen_texture_mipmaps(&mut self)
fn gen_texture_mipmaps(&mut self)
Generates GPU mipmaps for a
texture.Source§fn set_texture_filter(&self, _: &RaylibThread, filter_mode: TextureFilter)
fn set_texture_filter(&self, _: &RaylibThread, filter_mode: TextureFilter)
Sets global
texture scaling filter mode.Source§fn set_texture_wrap(&self, _: &RaylibThread, wrap_mode: TextureWrap)
fn set_texture_wrap(&self, _: &RaylibThread, wrap_mode: TextureWrap)
Sets global texture wrapping mode.
Auto Trait Implementations§
impl Freeze for Texture2D
impl RefUnwindSafe for Texture2D
impl Send for Texture2D
impl Sync for Texture2D
impl Unpin for Texture2D
impl UnwindSafe for Texture2D
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more