fn create_image_view(
    &self, image: vk::Image, format: vk::Format, aspect: vk::ImageAspectFlags, mip_levels: u32,
  ) -> SarektResult<vk::ImageView> {
    let subresource_range = vk::ImageSubresourceRange::builder()
      .base_mip_level(0)
      .level_count(mip_levels)
      .aspect_mask(aspect)
      .base_array_layer(0)
      .layer_count(1)
      .build();
    let image_view_ci = vk::ImageViewCreateInfo::builder()
      .image(image)
      .view_type(vk::ImageViewType::TYPE_2D)
      .format(format)
      .subresource_range(subresource_range)
      .build();
    unsafe {
      Ok(
        self
          .logical_device
          .create_image_view(&image_view_ci, None)?,
      )
    }
  }
/// vk::ImageAspectFlags specify what kind of attachment this image can be
/// used for (COLOR, DEPTH, etc).
:ImageAspectFlags specify what kind of attachment this image can be
used for (COLOR, DEPTH, etc).
: ImageAspectFlags specify what kind of attachment this image can be used for ( COLOR DEPTH etc ) .
fn create_image_view(
    &self, image: vk::Image, format: vk::Format, aspect: vk::ImageAspectFlags, mip_levels: u32,
  ) -> SarektResult<vk::ImageView> {
    let subresource_range = vk::ImageSubresourceRange::builder()
      .base_mip_level(0)
      .level_count(mip_levels)
      .aspect_mask(aspect)
      .base_array_layer(0)
      .layer_count(1)
      .build();
    let image_view_ci = vk::ImageViewCreateInfo::builder()
      .image(image)
      .view_type(vk::ImageViewType::TYPE_2D)
      .format(format)
      .subresource_range(subresource_range)
      .build();
    unsafe {
      Ok(
        self
          .logical_device
          .create_image_view(&image_view_ci, None)?,
      )
    }
  }
fn create_image_view ( & self , image : vk :: Image , format : vk :: Format , aspect : vk :: ImageAspectFlags , mip_levels : u32 , ) -> SarektResult < vk :: ImageView > { let subresource_range = vk :: ImageSubresourceRange :: builder ( ) . base_mip_level ( 0 ) . level_count ( mip_levels ) . aspect_mask ( aspect ) . base_array_layer ( 0 ) . layer_count ( 1 ) . build ( ) ; let image_view_ci = vk :: ImageViewCreateInfo :: builder ( ) . image ( image ) . view_type ( vk :: ImageViewType :: TYPE_2D ) . format ( format ) . subresource_range ( subresource_range ) . build ( ) ; unsafe { Ok ( self . logical_device . create_image_view ( & image_view_ci , None ) ? , ) } }
vk::ImageAspectFlags specify what kind of attachment this image can be
used for (COLOR, DEPTH, etc).
vk :: ImageAspectFlags specify what kind of attachment this image can be used for ( COLOR DEPTH etc ) .
&self
image
vk::Image
format
vk::Format
aspect
vk::ImageAspectFlags
mip_levels
u32
&self
image
vk::Image
format
vk::Format
aspect
vk::ImageAspectFlags
mip_levels
u32