[−][src]Struct ggraphics::TextureHandle
This is actually not safe to Clone, we'd have to Rc the GlTexture. Having the Rc on the outside of this type is what we actually want.
Methods
impl TextureHandle
[src]
pub fn new(ctx: &GlContext, rgba: &[u8], width: usize, height: usize) -> Self
[src]
Create a new texture from the given slice of RGBA bytes.
pub unsafe fn new_empty(
ctx: &GlContext,
format: u32,
component_format: u32,
width: usize,
height: usize
) -> Self
[src]
ctx: &GlContext,
format: u32,
component_format: u32,
width: usize,
height: usize
) -> Self
Make a new empty texture with the given format. Note that reading from the texture will give undefined results, hence why this is unsafe.
pub fn into_shared(self) -> Texture
[src]
Turn this texture into a share-able, refcounted one.
Trait Implementations
impl Drop for TextureHandle
[src]
impl Debug for TextureHandle
[src]
Auto Trait Implementations
impl !Send for TextureHandle
impl !Sync for TextureHandle
impl Unpin for TextureHandle
impl UnwindSafe for TextureHandle
impl !RefUnwindSafe for TextureHandle
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,