![]() |
VPP
0.8
A high-level modern C++ API for Vulkan
|
Generic class representing Vulkan buffers. More...
#include <vppBuffer.hpp>
Public Types | |
enum | EUsageFlags { SOURCE = VK_BUFFER_USAGE_TRANSFER_SRC_BIT, TARGET = VK_BUFFER_USAGE_TRANSFER_DST_BIT, UNITEX = VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, STORTEX = VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, UNIFORM = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, STORAGE = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, INDEX = VK_BUFFER_USAGE_INDEX_BUFFER_BIT, VERTEX = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, INDIRECT = VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT } |
Buffer usage flags. Can be bitwise-combined to create multipurpose buffers. More... | |
enum | ECreationFlags { SPARSE_BINDING = VK_BUFFER_CREATE_SPARSE_BINDING_BIT, SPARSE_RESIDENCY = VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, SPARSE_ALIASED = VK_BUFFER_CREATE_SPARSE_ALIASED_BIT } |
Public Member Functions | |
Buf () | |
Constructs null reference. | |
Buf (VkDeviceSize bufferSize, unsigned int usageMask, const Device &hDevice, unsigned int flags=0) | |
Constructs a buffer of given size and usage (bitwise combination of EUsageFlags values), associated with given device. | |
Buf (VkDeviceSize bufferSize, unsigned int usageMask, const Device &hDevice, const std::vector< unsigned int > &queueFamilyIndices, unsigned int flags=0) | |
Constructs a buffer of given size and usage (bitwise combination of EUsageFlags values), associated with given device. This constructor also takes a list of queue families allowed to access the buffer in concurrent mode. | |
operator bool () const | |
Checks whether this is not a null reference. | |
VkBuffer | handle () const |
Retrieves Vulkan handle of the buffer. | |
const Device & | device () const |
Retrieves the device associated with the buffer. | |
VkDeviceSize | size () const |
Retrieves the size of the buffer. | |
unsigned int | getUsage () const |
Retrieves usage flags of the buffer. | |
template<class MemoryT > | |
MemoryT | bindMemory (const MemProfile &memProfile) const |
Allocates and binds memory for the buffer. | |
Generic class representing Vulkan buffers.
This object is reference-counted and may be passed by value.
It is not recommended to create these objects directly. Use Buffer instead.
This class serves mainly as a base class for the Buffer template. It contains some useful methods that are inherited. Also many VPP functions accept Buf as an argument, so you can provide any Buffer template instance.
Buffer usage flags. Can be bitwise-combined to create multipurpose buffers.