pub enum Kind {
D1(u32, u16),
D2(u32, u32, u16, u8),
D3(u32, u32, u32),
}
Expand description
Specifies the dimensionality of an image to be allocated, along with the number of mipmap layers and MSAA samples if applicable.
Variants§
D1(u32, u16)
A single one-dimensional row of texels.
D2(u32, u32, u16, u8)
Two-dimensional image.
D3(u32, u32, u32)
Volumetric image.
Implementations§
Source§impl Kind
impl Kind
Sourcepub fn level_extent(&self, level: u8) -> Extent
pub fn level_extent(&self, level: u8) -> Extent
Get the extent of a particular mipmap level.
Sourcepub fn num_levels(&self) -> u8
pub fn num_levels(&self) -> u8
Count the number of mipmap levels.
Sourcepub fn num_layers(&self) -> u16
pub fn num_layers(&self) -> u16
Return the number of layers in an array type.
Each cube face counts as separate layer.
Sourcepub fn num_samples(&self) -> u8
pub fn num_samples(&self) -> u8
Return the number of MSAA samples for the kind.
Trait Implementations§
Source§impl Ord for Kind
impl Ord for Kind
Source§impl PartialOrd for Kind
impl PartialOrd for Kind
impl Copy for Kind
impl Eq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)