class new in Git master
#include <Magnum/Vk/Image.h>
CopyBufferToImageInfo Buffer to image copy command.
Wraps a VkCopyBufferToImageInfo2KHR. This class is subsequently used in CommandBuffer::
Compatibility with vkCmdCopyBufferToImage()
While the class operates on the VkCopyBufferToImageInfo2KHR structure that's provided by the KHR_
For direct editing of the Vulkan structure, it's recommended to edit the VkCopyBufferToImageInfo2KHR fields and then perform the conversion instead of editing the resulting VkBufferImageCopy list, as additional safety checks may be done during the conversion to ensure no information is lost.
Derived classes
- class CopyBufferToImageInfo1D new in Git master
- Convenience constructor for a buffer to 1D image copy command.
- class CopyBufferToImageInfo1DArray new in Git master
- Convenience constructor for a buffer to 1D array image copy command.
- class CopyBufferToImageInfo2D new in Git master
- Convenience constructor for a buffer to 2D image copy command.
- class CopyBufferToImageInfo2DArray new in Git master
- Convenience constructor for a buffer to 2D array image copy command.
- class CopyBufferToImageInfo3D new in Git master
- Convenience constructor for a buffer to 3D image copy command.
- class CopyBufferToImageInfoCubeMap new in Git master
- Convenience constructor for a buffer to cube map image copy command.
- class CopyBufferToImageInfoCubeMapArray new in Git master
- Convenience constructor for a buffer to cube map array image copy command.
Constructors, destructors, conversion operators
-
CopyBufferToImageInfo(VkBuffer source,
VkImage destination,
ImageLayout destinationLayout,
Containers::
ArrayView<const BufferImageCopy> regions) - Constructor.
-
CopyBufferToImageInfo(VkBuffer source,
VkImage destination,
ImageLayout destinationLayout,
std::
initializer_list<BufferImageCopy> regions) - CopyBufferToImageInfo(NoInitT) explicit noexcept
- Construct without initializing the contents.
- CopyBufferToImageInfo(const VkCopyBufferToImageInfo2KHR& info) explicit
- Construct from existing data.
- operator const VkCopyBufferToImageInfo2KHR*() const
Public functions
-
auto vkBufferImageCopies() const -> Containers::
Array<VkBufferImageCopy> - Corresponding VkBufferImageCopy structures.
- auto operator*() -> VkCopyBufferToImageInfo2KHR&
- Underlying VkCopyBufferToImageInfo2KHR structure.
- auto operator*() const -> const VkCopyBufferToImageInfo2KHR&
- auto operator->() -> VkCopyBufferToImageInfo2KHR*
- auto operator->() const -> const VkCopyBufferToImageInfo2KHR*
Function documentation
Magnum:: Vk:: CopyBufferToImageInfo:: CopyBufferToImageInfo(VkBuffer source,
VkImage destination,
ImageLayout destinationLayout,
Containers:: ArrayView<const BufferImageCopy> regions)
Constructor.
Parameters | |
---|---|
source | Source Buffer or a raw Vulkan buffer handle. Expected to have been created with BufferUsage:: |
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 VkCopyBufferToImageInfo2KHR fields are pre-filled in addition to sType
, everything else is zero-filled:
srcBuffer
tosource
dstImage
todestination
dstImageLayout
todestinationLayout
regionCount
andpRegions
toregions
Magnum:: Vk:: CopyBufferToImageInfo:: CopyBufferToImageInfo(VkBuffer source,
VkImage destination,
ImageLayout destinationLayout,
std:: initializer_list<BufferImageCopy> 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:: CopyBufferToImageInfo:: CopyBufferToImageInfo(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:: CopyBufferToImageInfo:: CopyBufferToImageInfo(const VkCopyBufferToImageInfo2KHR& 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:: CopyBufferToImageInfo:: operator const VkCopyBufferToImageInfo2KHR*() 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<VkBufferImageCopy> Magnum:: Vk:: CopyBufferToImageInfo:: vkBufferImageCopies() const
Corresponding VkBufferImageCopy structures.
Provided for compatibility with Vulkan implementations that don't support the KHR_
const VkCopyBufferToImageInfo2KHR& Magnum:: Vk:: CopyBufferToImageInfo:: operator*() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
VkCopyBufferToImageInfo2KHR* Magnum:: Vk:: CopyBufferToImageInfo:: operator->()
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const VkCopyBufferToImageInfo2KHR* Magnum:: Vk:: CopyBufferToImageInfo:: operator->() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.