class new in Git master
#include <Magnum/Vk/Image.h>
CopyImageInfo Image copy command.
Wraps a VkCopyImageInfo2KHR. This class is subsequently used in CommandBuffer::
Compatibility with vkCmdCopyImage()
While the class operates on the VkCopyImageInfo2KHR structure that's provided by the KHR_
For direct editing of the Vulkan structure, it's recommended to edit the VkCopyImageInfo2KHR fields and then perform the conversion instead of editing the resulting VkImageCopy list, as additional safety checks may be done during the conversion to ensure no information is lost.
Constructors, destructors, conversion operators
-
CopyImageInfo(VkImage source,
ImageLayout sourceLayout,
VkImage destination,
ImageLayout destinationLayout,
Containers::
ArrayView<const ImageCopy> regions) - Constructor.
-
CopyImageInfo(VkImage source,
ImageLayout sourceLayout,
VkImage destination,
ImageLayout destinationLayout,
std::
initializer_list<ImageCopy> regions) - CopyImageInfo(NoInitT) explicit noexcept
- Construct without initializing the contents.
- CopyImageInfo(const VkCopyImageInfo2KHR& info) explicit
- Construct from existing data.
- operator const VkCopyImageInfo2KHR*() const
Public functions
-
auto vkImageCopies() const -> Containers::
Array<VkImageCopy> - Corresponding VkImageCopy structures.
- auto operator*() -> VkCopyImageInfo2KHR&
- Underlying VkCopyImageInfo2KHR structure.
- auto operator*() const -> const VkCopyImageInfo2KHR&
- auto operator->() -> VkCopyImageInfo2KHR*
- auto operator->() const -> const VkCopyImageInfo2KHR*
Function documentation
Magnum:: Vk:: CopyImageInfo:: CopyImageInfo(VkImage source,
ImageLayout sourceLayout,
VkImage destination,
ImageLayout destinationLayout,
Containers:: ArrayView<const ImageCopy> regions)
Constructor.
Parameters | |
---|---|
source | Source Image or a raw Vulkan image handle. Expected to have been created with ImageUsage:: |
sourceLayout | Source image layout. Can be either ImageLayout:: |
destination | Destination Image or a raw Vulkan image handle. Expected to have been created with ImageUsage:: |
destinationLayout | Destination image layout. Can be either ImageLayout:: |
regions | Regions to copy. THere has to be at least one. |
The following VkCopyImageInfo2KHR fields are pre-filled in addition to sType
, everything else is zero-filled:
srcImage
tosource
srcImageLayout
tosourceLayout
dstImage
todestination
dstImageLayout
todestinationLayout
regionCount
andpRegions
toregions
Magnum:: Vk:: CopyImageInfo:: CopyImageInfo(VkImage source,
ImageLayout sourceLayout,
VkImage destination,
ImageLayout destinationLayout,
std:: initializer_list<ImageCopy> regions)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Magnum:: Vk:: CopyImageInfo:: CopyImageInfo(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:: CopyImageInfo:: CopyImageInfo(const VkCopyImageInfo2KHR& 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:: CopyImageInfo:: operator const VkCopyImageInfo2KHR*() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Containers:: Array<VkImageCopy> Magnum:: Vk:: CopyImageInfo:: vkImageCopies() const
Corresponding VkImageCopy structures.
Provided for compatibility with Vulkan implementations that don't support the KHR_
const VkCopyImageInfo2KHR& Magnum:: Vk:: CopyImageInfo:: operator*() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
VkCopyImageInfo2KHR* Magnum:: Vk:: CopyImageInfo:: operator->()
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const VkCopyImageInfo2KHR* Magnum:: Vk:: CopyImageInfo:: operator->() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.