pub enum Kind {
D1(Size, Layer),
D2(Size, Size, Layer, NumSamples),
D3(Size, Size, Size),
}
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(Size, Layer)
A single one-dimensional row of texels.
D2(Size, Size, Layer, NumSamples)
Two-dimensional image.
D3(Size, Size, Size)
Volumetric image.
Implementations§
Source§impl Kind
impl Kind
Sourcepub fn level_extent(&self, level: Level) -> Extent
pub fn level_extent(&self, level: Level) -> Extent
Get the extent of a particular mipmap level.
Sourcepub fn compute_num_levels(&self) -> Level
pub fn compute_num_levels(&self) -> Level
Count the number of mipmap levels.
Sourcepub fn num_layers(&self) -> Layer
pub fn num_layers(&self) -> Layer
Return the number of layers in an array type.
Each cube face counts as separate layer.
Sourcepub fn num_samples(&self) -> NumSamples
pub fn num_samples(&self) -> NumSamples
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