class new in Git master
#include <Magnum/Vk/Buffer.h>
CopyBufferInfo Buffer copy command.
Wraps a VkCopyBufferInfo2KHR. This class is subsequently used in CommandBuffer::
Compatibility with vkCmdCopyBuffer()
While the class operates on the VkCopyBufferInfo2KHR structure that's provided by the KHR_
For direct editing of the Vulkan structure, it's recommended to edit the VkCopyBufferInfo2KHR fields and then perform the conversion instead of editing the resulting VkBufferCopy list, as additional safety checks may be done during the conversion to ensure no information is lost.
Constructors, destructors, conversion operators
-
CopyBufferInfo(VkBuffer source,
VkBuffer destination,
Containers::
ArrayView<const BufferCopy> regions) - Constructor.
-
CopyBufferInfo(VkBuffer source,
VkBuffer destination,
std::
initializer_list<BufferCopy> regions) - CopyBufferInfo(NoInitT) explicit noexcept
- Construct without initializing the contents.
- CopyBufferInfo(const VkCopyBufferInfo2KHR& info) explicit
- Construct from existing data.
- operator const VkCopyBufferInfo2KHR*() const
Public functions
-
auto vkBufferCopies() const -> Containers::
Array<VkBufferCopy> - Corresponding VkBufferCopy structures.
- auto operator*() -> VkCopyBufferInfo2KHR&
- Underlying VkCopyBufferInfo2KHR structure.
- auto operator*() const -> const VkCopyBufferInfo2KHR&
- auto operator->() -> VkCopyBufferInfo2KHR*
- auto operator->() const -> const VkCopyBufferInfo2KHR*
Function documentation
Magnum:: Vk:: CopyBufferInfo:: CopyBufferInfo(VkBuffer source,
VkBuffer destination,
Containers:: ArrayView<const BufferCopy> regions)
Constructor.
Parameters | |
---|---|
source | Source Buffer or a raw Vulkan buffer handle. Expected to have been created with BufferUsage:: |
destination | Destination Buffer or a raw Vulkan buffer handle. Expected to have been created with BufferUsage:: |
regions | Regions to copy. There has to be at least one. |
Magnum:: Vk:: CopyBufferInfo:: CopyBufferInfo(VkBuffer source,
VkBuffer destination,
std:: initializer_list<BufferCopy> 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:: CopyBufferInfo:: CopyBufferInfo(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:: CopyBufferInfo:: CopyBufferInfo(const VkCopyBufferInfo2KHR& 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:: CopyBufferInfo:: operator const VkCopyBufferInfo2KHR*() 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<VkBufferCopy> Magnum:: Vk:: CopyBufferInfo:: vkBufferCopies() const
Corresponding VkBufferCopy structures.
Provided for compatibility with Vulkan implementations that don't support the KHR_
const VkCopyBufferInfo2KHR& Magnum:: Vk:: CopyBufferInfo:: operator*() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
VkCopyBufferInfo2KHR* Magnum:: Vk:: CopyBufferInfo:: operator->()
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const VkCopyBufferInfo2KHR* Magnum:: Vk:: CopyBufferInfo:: operator->() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.