[−][src]Struct gli_rs::GliImage
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 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
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,