#pragma once
#include "../vulkan.h"
#include "vk_mem_alloc.h"
namespace vulkanapi {
	class Backend;
	class Buffer {
	protected:
	public:
		static VmaAllocator vmaAllocator;
		static void MakeVmaAllocator(Backend& backend);
		static VkBufferCreateInfo MakeStageInfo(VmaAllocationCreateInfo& allocationCreateInfo, VkDeviceSize vertexBufferSize);
		static VkBufferCreateInfo MakeDeviceInfo(VmaAllocationCreateInfo& allocationCreateInfo, VkDeviceSize vertexBufferSize, VkBufferUsageFlags flags);
		static VkBuffer CreateBuffer(VkBufferCreateInfo& bufferCreateInfo,
			VmaAllocationCreateInfo& allocationCreateInfo,
			VmaAllocation& allocation);
		static VkBuffer CreateStageBuffer(VmaAllocationCreateInfo& allocationCreateInfo, VmaAllocation& allocation, VkDeviceSize vertexBufferSize);
		static void CopyData(VmaAllocation& allocation,void* data, VkDeviceSize size);
		static void DestroyBuffer(VkBuffer buffer, VmaAllocation bufferAlloc);
		static void CreateImage(VkImageCreateInfo& imageInfo, VkImage& ptr, VmaAllocation& allocation, VmaMemoryUsage usage);
	};
}