pub struct Surface<T> {
pub width: u32,
pub height: u32,
pub depth: u32,
pub image_data: T,
pub mipmap_count: u32,
pub layer_count: u32,
pub image_format: NutexbFormat,
}
Expand description
A surface describing a contiguous chunk of image data for the array layers and mipmaps used to create a NutexbFile.
Fields§
§width: u32
The width of the image in pixels.
height: u32
The height of the image in pixels.
depth: u32
The depth of the image in pixels. This should be 1
for 2D textures.
image_data: T
The raw image data for each layer and mipmap before applying any swizzling. Data should be arranged in row-major order with no padding between arrays and mipmaps. See tegra_swizzle::surface for details.
Functions accept owned data like Vec<u8>
or borrowed data like &[u8]
.
mipmap_count: u32
The number of mipmaps or 1
to indicate no mipmaps.
layer_count: u32
The number of array layers or 1
to indicate no layers.
This should be 6
for cube maps.
image_format: NutexbFormat
The format of the data stored in image_data.
Trait Implementations§
source§impl<T: PartialEq> PartialEq for Surface<T>
impl<T: PartialEq> PartialEq for Surface<T>
impl<T: Eq> Eq for Surface<T>
impl<T> StructuralPartialEq for Surface<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Surface<T>where
T: RefUnwindSafe,
impl<T> Send for Surface<T>where
T: Send,
impl<T> Sync for Surface<T>where
T: Sync,
impl<T> Unpin for Surface<T>where
T: Unpin,
impl<T> UnwindSafe for Surface<T>where
T: UnwindSafe,
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