class new in Git master
#include <Magnum/Vk/Buffer.h>
BufferCopy Buffer copy region.
Wraps a VkBufferCopy2KHR. This class is subsequently passed to a CopyBufferInfo and then used in CommandBuffer::
Compatibility with VkBufferCopy
While the class operates on the VkBufferCopy2KHR structure that's provided by the KHR_
For direct editing of the Vulkan structure, it's recommended to edit the VkBufferCopy2KHR fields and then perform the conversion instead of editing the resulting VkBufferCopy, as additional safety checks may be done during the conversion to ensure no information is lost.
Constructors, destructors, conversion operators
- BufferCopy(UnsignedLong sourceOffset, UnsignedLong destinationOffset, UnsignedLong size)
- Constructor.
- BufferCopy(NoInitT) explicit noexcept
- Construct without initializing the contents.
- BufferCopy(const VkBufferCopy2KHR& copy) explicit
- Construct from existing data.
- BufferCopy(const VkBufferCopy& copy) explicit
- Construct from a VkBufferCopy
- operator const VkBufferCopy2KHR*() const
- operator const VkBufferCopy2KHR&() const
Public functions
- auto vkBufferCopy() const -> VkBufferCopy
- Corresponding VkBufferCopy structure.
- auto operator*() -> VkBufferCopy2KHR&
- Underlying VkBufferCopy2KHR structure.
- auto operator*() const -> const VkBufferCopy2KHR&
- auto operator->() -> VkBufferCopy2KHR*
- auto operator->() const -> const VkBufferCopy2KHR*
Function documentation
Magnum:: Vk:: BufferCopy:: BufferCopy(UnsignedLong sourceOffset,
UnsignedLong destinationOffset,
UnsignedLong size)
Constructor.
Parameters | |
---|---|
sourceOffset | Source buffer offset in bytes |
destinationOffset | Destination buffer offset in bytes |
size | Size to copy in bytes |
The following VkBufferCopy2KHR fields are pre-filled in addition to sType
, everything else is zero-filled:
srcOffset
tosourceOffset
dstOffset
todestinationOffset
size
Magnum:: Vk:: BufferCopy:: BufferCopy(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:: BufferCopy:: BufferCopy(const VkBufferCopy2KHR& copy) 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:: BufferCopy:: BufferCopy(const VkBufferCopy& copy) explicit
Construct from a VkBufferCopy
Compared to the above, fills the common subset of VkBufferCopy2KHR, sets sType
and zero-fills pNext
.
Magnum:: Vk:: BufferCopy:: operator const VkBufferCopy2KHR*() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Magnum:: Vk:: BufferCopy:: operator const VkBufferCopy2KHR&() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The class is implicitly convertible to a reference in addition to a pointer because the type is commonly used in arrays as well, which would be annoying to do with a pointer conversion.
VkBufferCopy Magnum:: Vk:: BufferCopy:: vkBufferCopy() const
Corresponding VkBufferCopy structure.
Provided for compatibility with Vulkan implementations that don't support the KHR_
const VkBufferCopy2KHR& Magnum:: Vk:: BufferCopy:: operator*() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
VkBufferCopy2KHR* Magnum:: Vk:: BufferCopy:: operator->()
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const VkBufferCopy2KHR* Magnum:: Vk:: BufferCopy:: operator->() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.