pub struct Texture2D { /* private fields */ }
Expand description
Texture, data stored in GPU memory
Implementations
sourceimpl Texture2D
impl Texture2D
pub fn from_oxid_texture(texture: Texture) -> Texture2D
pub fn empty() -> Texture2D
pub fn update(&mut self, ctx: &mut Context, image: &Image)
pub fn width(&self) -> f32
pub fn height(&self) -> f32
pub fn from_file_with_format<'a>(
ctx: &mut Context,
bytes: &[u8],
format: Option<ImageFormat>
) -> Texture2D
pub fn from_rgba8(
ctx: &mut Context,
width: u16,
height: u16,
bytes: &[u8]
) -> Texture2D
pub fn set_filter(&self, ctx: &mut Context, filter_mode: FilterMode)
pub fn raw_oxid_texture_handle(&self) -> Texture
pub fn grab_screen(&self)
pub fn get_texture_data(&self) -> Image
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Texture2D
impl Send for Texture2D
impl Sync for Texture2D
impl Unpin for Texture2D
impl UnwindSafe for Texture2D
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more