pub struct ImageView<I> where
I: ImageAccess + ?Sized, { /* private fields */ }
Expand description
A wrapper around an image that makes it available to shaders or framebuffers.
Implementations
sourceimpl<I> ImageView<I> where
I: ImageAccess + ?Sized,
impl<I> ImageView<I> where
I: ImageAccess + ?Sized,
sourcepub fn new(
image: Arc<I>,
create_info: ImageViewCreateInfo
) -> Result<Arc<ImageView<I>>, ImageViewCreationError>
pub fn new(
image: Arc<I>,
create_info: ImageViewCreateInfo
) -> Result<Arc<ImageView<I>>, ImageViewCreationError>
Creates a new ImageView
.
Panics
- Panics if
create_info.array_layers
is empty. - Panics if
create_info.mip_levels
is empty. - Panics if
create_info.aspects
contains any aspects other thancolor
,depth
,stencil
,plane0
,plane1
orplane2
. - Panics if
create_info.aspects
contains more more than one aspect, unlessdepth
andstencil
are the only aspects selected.
sourcepub fn new_default(
image: Arc<I>
) -> Result<Arc<ImageView<I>>, ImageViewCreationError>
pub fn new_default(
image: Arc<I>
) -> Result<Arc<ImageView<I>>, ImageViewCreationError>
Creates a default ImageView
. Equivalent to
ImageView::new_default(image, ImageViewCreateInfo::from_image(image))
.
Trait Implementations
sourceimpl<I> Debug for ImageView<I> where
I: ImageAccess + ?Sized,
impl<I> Debug for ImageView<I> where
I: ImageAccess + ?Sized,
sourceimpl<I> DeviceOwned for ImageView<I> where
I: ImageAccess + ?Sized,
impl<I> DeviceOwned for ImageView<I> where
I: ImageAccess + ?Sized,
sourceimpl<I> Drop for ImageView<I> where
I: ImageAccess + ?Sized,
impl<I> Drop for ImageView<I> where
I: ImageAccess + ?Sized,
sourceimpl<I> Hash for ImageView<I> where
I: ImageAccess + ?Sized,
impl<I> Hash for ImageView<I> where
I: ImageAccess + ?Sized,
sourceimpl<I> ImageViewAbstract for ImageView<I> where
I: ImageAccess + 'static,
impl<I> ImageViewAbstract for ImageView<I> where
I: ImageAccess + 'static,
sourcefn image(&self) -> Arc<dyn ImageAccess>
fn image(&self) -> Arc<dyn ImageAccess>
Returns the wrapped image that this image view was created from.
sourcefn array_layers(&self) -> Range<u32>
fn array_layers(&self) -> Range<u32>
Returns the range of array layers of the wrapped image that this view exposes.
sourcefn aspects(&self) -> &ImageAspects
fn aspects(&self) -> &ImageAspects
Returns the aspects of the wrapped image that this view exposes.
sourcefn component_mapping(&self) -> ComponentMapping
fn component_mapping(&self) -> ComponentMapping
Returns the component mapping of this view.
sourcefn filter_cubic(&self) -> bool
fn filter_cubic(&self) -> bool
sourcefn filter_cubic_minmax(&self) -> bool
fn filter_cubic_minmax(&self) -> bool
sourcefn format(&self) -> Option<Format>
fn format(&self) -> Option<Format>
Returns the format of this view. This can be different from the parent’s format.
sourcefn format_features(&self) -> &FormatFeatures
fn format_features(&self) -> &FormatFeatures
Returns the features supported by the image view’s format.
sourcefn mip_levels(&self) -> Range<u32>
fn mip_levels(&self) -> Range<u32>
Returns the range of mip levels of the wrapped image that this view exposes.
sourcefn sampler_ycbcr_conversion(&self) -> Option<&Arc<SamplerYcbcrConversion>>
fn sampler_ycbcr_conversion(&self) -> Option<&Arc<SamplerYcbcrConversion>>
Returns the sampler YCbCr conversion that this image view was created with, if any.
sourcefn usage(&self) -> &ImageUsage
fn usage(&self) -> &ImageUsage
Returns the usage of the image view.
sourcefn view_type(&self) -> ImageViewType
fn view_type(&self) -> ImageViewType
Returns the ImageViewType
of this image view.
sourceimpl ImageViewAbstract for ImageView<dyn ImageAccess>
impl ImageViewAbstract for ImageView<dyn ImageAccess>
sourcefn image(&self) -> Arc<dyn ImageAccess>
fn image(&self) -> Arc<dyn ImageAccess>
Returns the wrapped image that this image view was created from.
sourcefn array_layers(&self) -> Range<u32>
fn array_layers(&self) -> Range<u32>
Returns the range of array layers of the wrapped image that this view exposes.
sourcefn aspects(&self) -> &ImageAspects
fn aspects(&self) -> &ImageAspects
Returns the aspects of the wrapped image that this view exposes.
sourcefn component_mapping(&self) -> ComponentMapping
fn component_mapping(&self) -> ComponentMapping
Returns the component mapping of this view.
sourcefn filter_cubic(&self) -> bool
fn filter_cubic(&self) -> bool
sourcefn filter_cubic_minmax(&self) -> bool
fn filter_cubic_minmax(&self) -> bool
sourcefn format(&self) -> Option<Format>
fn format(&self) -> Option<Format>
Returns the format of this view. This can be different from the parent’s format.
sourcefn format_features(&self) -> &FormatFeatures
fn format_features(&self) -> &FormatFeatures
Returns the features supported by the image view’s format.
sourcefn mip_levels(&self) -> Range<u32>
fn mip_levels(&self) -> Range<u32>
Returns the range of mip levels of the wrapped image that this view exposes.
sourcefn sampler_ycbcr_conversion(&self) -> Option<&Arc<SamplerYcbcrConversion>>
fn sampler_ycbcr_conversion(&self) -> Option<&Arc<SamplerYcbcrConversion>>
Returns the sampler YCbCr conversion that this image view was created with, if any.
sourcefn usage(&self) -> &ImageUsage
fn usage(&self) -> &ImageUsage
Returns the usage of the image view.
sourcefn view_type(&self) -> ImageViewType
fn view_type(&self) -> ImageViewType
Returns the ImageViewType
of this image view.
sourceimpl<I> VulkanObject for ImageView<I> where
I: ImageAccess + ?Sized,
impl<I> VulkanObject for ImageView<I> where
I: ImageAccess + ?Sized,
sourcefn internal_object(&self) -> ImageView
fn internal_object(&self) -> ImageView
Returns a reference to the object.
impl<I> Eq for ImageView<I> where
I: ImageAccess + ?Sized,
Auto Trait Implementations
impl<I: ?Sized> RefUnwindSafe for ImageView<I> where
I: RefUnwindSafe,
impl<I: ?Sized> Send for ImageView<I>
impl<I: ?Sized> Sync for ImageView<I>
impl<I: ?Sized> Unpin for ImageView<I>
impl<I: ?Sized> UnwindSafe for ImageView<I> where
I: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more