#pragma once #include #include #include "vertex.hpp" #include "vk_mem_alloc.h" class Buffer { public: explicit Buffer(VkDeviceSize size, VkBufferUsageFlags bufferUsage, VmaMemoryUsage memoryUsage, VmaAllocationCreateFlags flags); explicit Buffer(VkDeviceSize size, void* data, VkDeviceSize dataSize, VkBufferUsageFlags bufferUsage, VmaMemoryUsage memoryUsage, VmaAllocationCreateFlags flags); ~Buffer(); VkBuffer handle = VK_NULL_HANDLE; VmaAllocation allocation = VK_NULL_HANDLE; VmaAllocationInfo allocationInfo {}; VkDeviceSize size; Buffer(const Buffer& other) = delete; Buffer& operator =(const Buffer& other) = delete; private: void copyTo(Buffer* dst); };