[][src]Struct vulkayes_core::resource::image::params::ImageSize

pub struct ImageSize { /* fields omitted */ }

Implementations

impl ImageSize[src]

pub const unsafe fn new(
    image_type: ImageType,
    width: NonZeroU32,
    height: NonZeroU32,
    depth: NonZeroU32,
    array_layers: NonZeroU32,
    mipmap_levels: NonZeroU32
) -> Self
[src]

Creates a new image size.

Safety

  • width, height and depth must be valid for given image_type.
  • array_layers must be valid for given image_type.
  • mipmap_levels must be valid for given width, height and depth

pub fn new_1d(
    width: NonZeroU32,
    array_layers: NonZeroU32,
    mipmaps: MipmapLevels
) -> ImageSize1D
[src]

pub fn new_2d(
    width: NonZeroU32,
    height: NonZeroU32,
    array_layers: NonZeroU32,
    mipmaps: MipmapLevels
) -> ImageSize2D
[src]

pub fn new_3d(
    width: NonZeroU32,
    height: NonZeroU32,
    depth: NonZeroU32,
    mipmaps: MipmapLevels
) -> ImageSize3D
[src]

pub const fn image_type(&self) -> ImageType[src]

pub const fn extent(&self) -> [NonZeroU32; 3][src]

pub const fn width(&self) -> NonZeroU32[src]

pub const fn height(&self) -> NonZeroU32[src]

pub const fn depth(&self) -> NonZeroU32[src]

pub const fn array_layers(&self) -> NonZeroU32[src]

pub const fn mipmap_levels(&self) -> NonZeroU32[src]

pub fn complete_mipmap_chain_mipmaps(
    width: NonZeroU32,
    height: NonZeroU32,
    depth: NonZeroU32
) -> NonZeroU32
[src]

pub unsafe fn from_image_create_info(info: &ImageCreateInfo) -> Self[src]

Safety

  • info.extent.width must be non-zero
  • info.extent.height must be non-zero
  • info.extent.depth must be non-zero
  • info.array_layers must be non-zero
  • info.mip_levels must be non-zero

Trait Implementations

impl Clone for ImageSize[src]

impl Copy for ImageSize[src]

impl Debug for ImageSize[src]

impl Eq for ImageSize[src]

impl From<ImageSize> for ImageSizeInfo[src]

impl From<ImageSize1D> for ImageSize[src]

impl From<ImageSize2D> for ImageSize[src]

impl From<ImageSize3D> for ImageSize[src]

impl Hash for ImageSize[src]

impl Into<Extent2D> for ImageSize[src]

impl Into<Extent3D> for ImageSize[src]

impl PartialEq<ImageSize> for ImageSize[src]

impl StructuralEq for ImageSize[src]

impl StructuralPartialEq for ImageSize[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.