pub struct Texture { /* private fields */ }
Implementations§
Source§impl Texture
impl Texture
pub fn from_shallow_texture( gl: &Context, shalltex: &ShallowTexture, ) -> Result<Self, TextureError>
pub fn from_raw_pixels( gl: &Context, pixels: &[u8], width: u32, height: u32, ) -> Result<Self, TextureError>
pub fn bind(&self, gl: &Context)
pub fn bind_on(&self, gl: &Context, slot: u32)
pub fn unbind(&self, gl: &Context)
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn bpp(&self) -> u32
Auto Trait Implementations§
impl Freeze for Texture
impl RefUnwindSafe for Texture
impl Send for Texture
impl Sync for Texture
impl Unpin for Texture
impl UnwindSafe for Texture
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