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

Image creation info.

Wraps a VkImageCreateInfo. See Image creation for usage information.

Derived classes

class ImageCreateInfo1D new in Git master
Convenience constructor for 1D images.
class ImageCreateInfo1DArray new in Git master
Convenience constructor for 1D array images.
class ImageCreateInfo2D new in Git master
Convenience constructor for 2D images.
class ImageCreateInfo2DArray new in Git master
Convenience constructor for 2D array images.
class ImageCreateInfo3D new in Git master
Convenience constructor for 3D images.
class ImageCreateInfoCubeMap new in Git master
Convenience constructor for cube map images.
class ImageCreateInfoCubeMapArray new in Git master
Convenience constructor for cube map array images.

Public types

enum class Flag: UnsignedInt { MutableFormat = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, CubeCompatible = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT }
Image creation flag.
using Flags = Containers::EnumSet<Flag>
Image creation flags.

Constructors, destructors, conversion operators

ImageCreateInfo(VkImageType type, ImageUsages usages, PixelFormat format, const Vector3i& size, Int layers, Int levels, Int samples = 1, ImageLayout initialLayout = ImageLayout::Undefined, Flags flags = {}) explicit
Constructor.
ImageCreateInfo(VkImageType type, ImageUsages usages, Magnum::PixelFormat format, const Vector3i& size, Int layers, Int levels, Int samples = 1, ImageLayout initialLayout = ImageLayout::Undefined, Flags flags = {}) explicit
ImageCreateInfo(VkImageType type, ImageUsages usages, Magnum::CompressedPixelFormat format, const Vector3i& size, Int layers, Int levels, Int samples = 1, ImageLayout initialLayout = ImageLayout::Undefined, Flags flags = {}) explicit
ImageCreateInfo(NoInitT) explicit noexcept
Construct without initializing the contents.
ImageCreateInfo(const VkImageCreateInfo& info) explicit
Construct from existing data.
operator const VkImageCreateInfo*() const

Public functions

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

Enum documentation

enum class Magnum::Vk::ImageCreateInfo::Flag: UnsignedInt

Image creation flag.

Wraps VkImageCreateFlagBits.

Enumerators
MutableFormat

Allow creating a view of different format

CubeCompatible

Allow creating a cube map view

Typedef documentation

Function documentation

Magnum::Vk::ImageCreateInfo::ImageCreateInfo(VkImageType type, ImageUsages usages, PixelFormat format, const Vector3i& size, Int layers, Int levels, Int samples = 1, ImageLayout initialLayout = ImageLayout::Undefined, Flags flags = {}) explicit

Constructor.

Parameters
type Image type
usages Desired image usage. At least one flag is required.
format Image format. Available through Image::format() afterwards.
size Image size
layers Array layer count
levels Mip level count
samples Sample count
initialLayout Initial layout. Can be only either ImageLayout::Undefined or ImageLayout::Preinitialized.
flags Image creation flags

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

There are various restrictions on size, layers, levels for a particular type — for common image types you're encouraged to make use of ImageCreateInfo1D, ImageCreateInfo2D, ImageCreateInfo3D, ImageCreateInfo1DArray, ImageCreateInfo2DArray, ImageCreateInfoCubeMap and ImageCreateInfoCubeMapArray convenience classes instead of this constructor.

Magnum::Vk::ImageCreateInfo::ImageCreateInfo(VkImageType type, ImageUsages usages, Magnum::PixelFormat format, const Vector3i& size, Int layers, Int levels, Int samples = 1, ImageLayout initialLayout = ImageLayout::Undefined, 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::ImageCreateInfo::ImageCreateInfo(VkImageType type, ImageUsages usages, Magnum::CompressedPixelFormat format, const Vector3i& size, Int layers, Int levels, Int samples = 1, ImageLayout initialLayout = ImageLayout::Undefined, 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::ImageCreateInfo::ImageCreateInfo(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::ImageCreateInfo::ImageCreateInfo(const VkImageCreateInfo& 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::ImageCreateInfo::operator const VkImageCreateInfo*() const

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

const VkImageCreateInfo& Magnum::Vk::ImageCreateInfo::operator*() const

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

VkImageCreateInfo* Magnum::Vk::ImageCreateInfo::operator->()

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

const VkImageCreateInfo* Magnum::Vk::ImageCreateInfo::operator->() const

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