pub struct Texture<'gl> { /* private fields */ }Implementations§
Source§impl Texture<'static>
impl Texture<'static>
Sourcepub unsafe fn new_unsafe(
size: (u32, u32),
internal_format: InternalFormat,
) -> Self
pub unsafe fn new_unsafe( size: (u32, u32), internal_format: InternalFormat, ) -> Self
§Safety
Must only be called on a thread where there is a current
OpenGL context. The returned Texture must only
exist, while the OpenGL context is valid.
Source§impl<'gl> Texture<'gl>
impl<'gl> Texture<'gl>
pub fn new( _ctx: &mut RenderingContext<'gl>, size: (u32, u32), internal_format: InternalFormat, ) -> Self
pub fn upload_image_data( &mut self, (width, height): (u32, u32), format: PixelFormat, pixels: impl AsRef<[u8]>, )
pub unsafe fn upload_image_data_from_ptr( &mut self, (width, height): (u32, u32), format: PixelFormat, pixels: *const u8, )
pub fn upload_sub_image_data( &mut self, (x, y): (u32, u32), (width, height): (u32, u32), format: PixelFormat, pixels: impl AsRef<[u8]>, )
pub unsafe fn upload_sub_image_data_from_ptr( &mut self, (x, y): (u32, u32), (width, height): (u32, u32), format: PixelFormat, pixels: *const u8, )
pub fn set_wrap(&mut self, wrap: TextureWrap)
pub fn set_wrap_u(&mut self, wrap: TextureWrap)
pub fn set_wrap_v(&mut self, wrap: TextureWrap)
pub fn set_filter(&mut self, filter: TextureFilter)
pub unsafe fn bind(&self, unit: u32)
pub fn size(&self) -> (u32, u32)
Trait Implementations§
Auto Trait Implementations§
impl<'gl> Freeze for Texture<'gl>
impl<'gl> RefUnwindSafe for Texture<'gl>
impl<'gl> Send for Texture<'gl>
impl<'gl> Sync for Texture<'gl>
impl<'gl> Unpin for Texture<'gl>
impl<'gl> UnwindSafe for Texture<'gl>
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