pub struct MipmappedArray { /* private fields */ }Expand description
A mipmap pyramid — num_levels 3-D arrays sharing one allocation.
Implementations§
Source§impl MipmappedArray
impl MipmappedArray
Sourcepub fn new(
context: &Context,
width: usize,
height: usize,
depth: usize,
format: ArrayFormat,
num_channels: u32,
num_levels: u32,
flags: u32,
) -> Result<Self>
pub fn new( context: &Context, width: usize, height: usize, depth: usize, format: ArrayFormat, num_channels: u32, num_levels: u32, flags: u32, ) -> Result<Self>
Create a mipmap pyramid with num_levels levels. The base level is
(width, height, depth); each subsequent level is half-sized per
axis (hardware-managed).
Sourcepub fn level(&self, level: u32) -> Result<Array3D>
pub fn level(&self, level: u32) -> Result<Array3D>
Return level level as a borrowed Array3D. The returned view
does not free its own storage — the parent MipmappedArray owns it.
pub fn as_raw(&self) -> CUmipmappedArray
pub fn num_levels(&self) -> u32
Trait Implementations§
Source§impl Debug for MipmappedArray
impl Debug for MipmappedArray
Source§impl Drop for MipmappedArray
impl Drop for MipmappedArray
impl Send for MipmappedArray
impl Sync for MipmappedArray
Auto Trait Implementations§
impl Freeze for MipmappedArray
impl RefUnwindSafe for MipmappedArray
impl Unpin for MipmappedArray
impl UnsafeUnpin for MipmappedArray
impl UnwindSafe for MipmappedArray
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