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

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 than color, depth, stencil, plane0, plane1 or plane2.
  • Panics if create_info.aspects contains more more than one aspect, unless depth and stencil are the only aspects selected.

Creates a default ImageView. Equivalent to ImageView::new(image, ImageViewCreateInfo::from_image(image)).

Creates a new ImageView from a raw object handle.

Safety
  • handle must be a valid Vulkan object handle created from image.
  • create_info must match the info used to create the object.

Returns the wrapped image that this image view was created from.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the device that owns Self.
Executes the destructor for this type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
Returns the wrapped image that this image view was created from.
Returns the component mapping of this view.
Returns whether the image view supports sampling with a Cubic mag_filter or min_filter. Read more
Returns whether the image view supports sampling with a Cubic mag_filter or min_filter, and with a Min or Max reduction_mode. Read more
Returns the format of this view. This can be different from the parent’s format.
Returns the features supported by the image view’s format.
Returns the sampler YCbCr conversion that this image view was created with, if any.
Returns the subresource range of the wrapped image that this view exposes.
Returns the usage of the image view.
Returns the ImageViewType of this image view.
Returns the dimensions of this view.
Returns the wrapped image that this image view was created from.
Returns the component mapping of this view.
Returns whether the image view supports sampling with a Cubic mag_filter or min_filter. Read more
Returns whether the image view supports sampling with a Cubic mag_filter or min_filter, and with a Min or Max reduction_mode. Read more
Returns the format of this view. This can be different from the parent’s format.
Returns the features supported by the image view’s format.
Returns the sampler YCbCr conversion that this image view was created with, if any.
Returns the subresource range of the wrapped image that this view exposes.
Returns the usage of the image view.
Returns the ImageViewType of this image view.
Returns the dimensions of this view.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The type of the object.
Returns the raw Vulkan handle of the object.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.