Struct vulkano::image::view::UnsafeImageView [−][src]
pub struct UnsafeImageView { /* fields omitted */ }
Expand description
A low-level wrapper around a vkImageView
.
Implementations
pub unsafe fn new(
image: &UnsafeImage,
ty: ImageViewType,
component_mapping: ComponentMapping,
mipmap_levels: Range<u32>,
array_layers: Range<u32>
) -> Result<UnsafeImageView, OomError>
pub unsafe fn new(
image: &UnsafeImage,
ty: ImageViewType,
component_mapping: ComponentMapping,
mipmap_levels: Range<u32>,
array_layers: Range<u32>
) -> Result<UnsafeImageView, OomError>
Creates a new view from an image.
Safety
- The returned
UnsafeImageView
must not outliveimage
. image
must have a usage that is compatible with image views.ty
must be compatible with the dimensions and flags of the image.mipmap_levels
must not be empty, must be within the range of levels of the image, and be compatible with the requestedty
.array_layers
must not be empty, must be within the range of layers of the image, and be compatible with the requestedty
.
Panics
Panics if the image is a YcbCr image, since the Vulkano API is not yet flexible enough to specify the aspect of image.
Trait Implementations
Returns a reference to the object.
Auto Trait Implementations
impl RefUnwindSafe for UnsafeImageView
impl Send for UnsafeImageView
impl Sync for UnsafeImageView
impl Unpin for UnsafeImageView
impl UnwindSafe for UnsafeImageView
Blanket Implementations
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.