UgImageView

Vulkan image view creation and management

It

Vulkan image together with its default image view

struct It {
  VkImage image;
  VkImageView view;
};

create

Create an image view for a given image and format

UgImageView.It create(UgContext.It& ctx, VkImage image, VkFormat format);

Parameters

  • ctx — Vulkan context
  • image — Image to create the view for
  • format — Pixel format of the image

Returns — Initialized image view object


destroy

Destroy an image view

U0 destroy(UgContext.It& ctx, UgImageView.It& imageView);

Parameters

  • ctx — Vulkan context
  • imageView — Image view to destroy

makeView

Create a raw VkImageView with a custom aspect mask

VkImageView makeView(UgContext.It& ctx, VkImage image, VkFormat format, VkImageAspectFlags aspectMask);

Parameters

  • ctx — Vulkan context
  • image — Image to create the view for
  • format — Pixel format of the image
  • aspectMask — Aspect flags for the view (color, depth, stencil)

Returns — Raw image view handle