[][src]Struct gli_rs::GliImage

#[repr(transparent)]
pub struct GliImage { /* fields omitted */ }

GliImage representation for a single texture level.

Methods

impl GliImage[src]

pub fn new(format: Format, extent: Extent3d) -> GliImage[src]

Create an image object and allocate an image storage for it.

pub fn new_empty() -> GliImage[src]

Create an empty image instance.

pub fn share_from(image: &GliImage, format: Format) -> GliImage[src]

Create an image object by sharing an existing image storage_linear from another image instance. This image object is effectively an image view where format can be reinterpreted with a different compatible image format. For formats to be compatible, the block size of source and destination must match.

pub fn clear(&mut self)[src]

Clear the entire image storage_linear with zeros.

pub fn data(&self) -> *const c_void[src]

Return a pointer to the beginning of the texture instance data.

pub unsafe fn data_mut(&mut self) -> *mut c_void[src]

Return a mutable pointer to the beginning of the texture instance data.

pub fn empty(&self) -> bool[src]

Return whether the image instance is empty, no storage_linear or description have been assigned to the instance.

pub fn extent(&self) -> Extent3d[src]

Return the dimensions of an image instance: width, height and depth.

pub fn format(&self) -> Format[src]

Return the image instance format.

pub fn size(&self) -> usize[src]

Return the memory size of an image instance storage_linear in bytes.

Trait Implementations

impl Eq for GliImage[src]

impl PartialEq<GliImage> for GliImage[src]

fn eq(&self, other: &GliImage) -> bool[src]

Compare two images. Two images are equal when the data is the same.

fn ne(&self, other: &GliImage) -> bool[src]

Compare two images. Two images are equal when the date is the same.

Auto Trait Implementations

impl RefUnwindSafe for GliImage

impl !Send for GliImage

impl !Sync for GliImage

impl Unpin for GliImage

impl UnwindSafe for GliImage

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.