Magnum::Vk::ImageViewCreateInfo class new in Git master

Image view creation info.

Wraps a VkImageViewCreateInfo. See Image creation for usage information.

Derived classes

class ImageViewCreateInfo1D new in Git master
Convenience constructor for 1D image views.
class ImageViewCreateInfo1DArray new in Git master
Convenience constructor for 1D array image views.
class ImageViewCreateInfo2D new in Git master
Convenience constructor for 2D image views.
class ImageViewCreateInfo2DArray new in Git master
Convenience constructor for 2D array image views.
class ImageViewCreateInfo3D new in Git master
Convenience constructor for 3D image views.
class ImageViewCreateInfoCubeMap new in Git master
Convenience constructor for cube map image views.
class ImageViewCreateInfoCubeMapArray new in Git master
Convenience constructor for cube map array image views.

Public types

enum class Flag: UnsignedInt { }
Image view creation flag.
using Flags = Containers::EnumSet<Flag>
ImageView creation flags.

Constructors, destructors, conversion operators

ImageViewCreateInfo(VkImageViewType type, VkImage image, PixelFormat format, UnsignedInt layerOffset = 0, UnsignedInt layerCount = VK_REMAINING_ARRAY_LAYERS, UnsignedInt levelOffset = 0, UnsignedInt levelCount = VK_REMAINING_MIP_LEVELS, Flags flags = {}) explicit
Constructor.
ImageViewCreateInfo(VkImageViewType type, VkImage image, Magnum::PixelFormat format, UnsignedInt layerOffset = 0, UnsignedInt layerCount = VK_REMAINING_ARRAY_LAYERS, UnsignedInt levelOffset = 0, UnsignedInt levelCount = VK_REMAINING_MIP_LEVELS, Flags flags = {}) explicit
ImageViewCreateInfo(VkImageViewType type, VkImage image, Magnum::CompressedPixelFormat format, UnsignedInt layerOffset = 0, UnsignedInt layerCount = VK_REMAINING_ARRAY_LAYERS, UnsignedInt levelOffset = 0, UnsignedInt levelCount = VK_REMAINING_MIP_LEVELS, Flags flags = {}) explicit
ImageViewCreateInfo(VkImageViewType type, Image& image, UnsignedInt layerOffset = 0, UnsignedInt layerCount = VK_REMAINING_ARRAY_LAYERS, UnsignedInt levelOffset = 0, UnsignedInt levelCount = VK_REMAINING_MIP_LEVELS, Flags flags = {}) explicit
Construct with format matching given image.
ImageViewCreateInfo(NoInitT) explicit noexcept
Construct without initializing the contents.
ImageViewCreateInfo(const VkImageViewCreateInfo& info) explicit
Construct from existing data.
operator const VkImageViewCreateInfo*() const

Public functions

auto operator*() -> VkImageViewCreateInfo&
Underlying VkBufferCreateInfo structure.
auto operator*() const -> const VkImageViewCreateInfo&
auto operator->() -> VkImageViewCreateInfo*
auto operator->() const -> const VkImageViewCreateInfo*

Enum documentation

Typedef documentation

Function documentation

Magnum::Vk::ImageViewCreateInfo::ImageViewCreateInfo(VkImageViewType type, VkImage image, PixelFormat format, UnsignedInt layerOffset = 0, UnsignedInt layerCount = VK_REMAINING_ARRAY_LAYERS, UnsignedInt levelOffset = 0, UnsignedInt levelCount = VK_REMAINING_MIP_LEVELS, Flags flags = {}) explicit

Constructor.

Parameters
type Image view type
image Image to create a view on
format View format
layerOffset Layer offset
layerCount Layer count
levelOffset Mip level offset
levelCount Mip level count
flags Image view creation flags

The following VkImageViewCreateInfo are pre-filled in addition to sType, everything else is zero-filled:

  • flags
  • image
  • viewType to type
  • format
  • subresourceRange.aspectMask to ImageAspect::Depth / ImageAspect::Stencil if format is depth / stencil or both and ImageAspect::Color otherwise
  • subresourceRange.levelOffset to levelOffset
  • subresourceRange.levelCount to levelCount
  • subresourceRange.baseArrayLayer to layerOffset
  • subresourceRange.layerCount to layerCount

The type and format has to be compatible with image and the mip level and layer sub-range has to be in bounds. For creating a view that exactly matches the image type and format, use the ImageViewCreateInfo(VkImageViewType, Image&, UnsignedInt, UnsignedInt, UnsignedInt, UnsignedInt, Flags) constructor. Otherwise, similarly as with ImageCreateInfo, for common view types you're encouraged to make use of ImageViewCreateInfo1D, ImageViewCreateInfo2D, ImageViewCreateInfo3D, ImageViewCreateInfo1DArray, ImageViewCreateInfo2DArray, ImageViewCreateInfoCubeMap and ImageViewCreateInfoCubeMapArray convenience classes instead of this constructor.

Magnum::Vk::ImageViewCreateInfo::ImageViewCreateInfo(VkImageViewType type, VkImage image, Magnum::PixelFormat format, UnsignedInt layerOffset = 0, UnsignedInt layerCount = VK_REMAINING_ARRAY_LAYERS, UnsignedInt levelOffset = 0, UnsignedInt levelCount = VK_REMAINING_MIP_LEVELS, Flags flags = {}) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Vk::ImageViewCreateInfo::ImageViewCreateInfo(VkImageViewType type, VkImage image, Magnum::CompressedPixelFormat format, UnsignedInt layerOffset = 0, UnsignedInt layerCount = VK_REMAINING_ARRAY_LAYERS, UnsignedInt levelOffset = 0, UnsignedInt levelCount = VK_REMAINING_MIP_LEVELS, Flags flags = {}) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Vk::ImageViewCreateInfo::ImageViewCreateInfo(VkImageViewType type, Image& image, UnsignedInt layerOffset = 0, UnsignedInt layerCount = VK_REMAINING_ARRAY_LAYERS, UnsignedInt levelOffset = 0, UnsignedInt levelCount = VK_REMAINING_MIP_LEVELS, Flags flags = {}) explicit

Construct with format matching given image.

Compared to ImageViewCreateInfo(VkImageViewType, VkImage, PixelFormat, UnsignedInt, UnsignedInt, UnsignedInt, UnsignedInt, Flags) the format is taken from Image::format().

Magnum::Vk::ImageViewCreateInfo::ImageViewCreateInfo(NoInitT) explicit noexcept

Construct without initializing the contents.

Note that not even the sType field is set — the structure has to be fully initialized afterwards in order to be usable.

Magnum::Vk::ImageViewCreateInfo::ImageViewCreateInfo(const VkImageViewCreateInfo& info) explicit

Construct from existing data.

Copies the existing values verbatim, pointers are kept unchanged without taking over the ownership. Modifying the newly created instance will not modify the original data nor the pointed-to data.

Magnum::Vk::ImageViewCreateInfo::operator const VkImageViewCreateInfo*() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

const VkImageViewCreateInfo& Magnum::Vk::ImageViewCreateInfo::operator*() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

VkImageViewCreateInfo* Magnum::Vk::ImageViewCreateInfo::operator->()

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

const VkImageViewCreateInfo* Magnum::Vk::ImageViewCreateInfo::operator->() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.