#pragma once

#include "Primitives.h"

#include <optional>
#include <vector>
#include <vulkan/vulkan_core.h>

#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>

struct FVertexBufferConfig
{
	VkDevice		 Device;
	VkPhysicalDevice PhysicalDevice;
};

class VulkanVertexBuffer
{
public:
	void Initialize(FVertexBufferConfig InConfig);

	void Cleanup();

	void CreateVertexBuffer(const std::vector<Vertex>& InVertices);

	uint32_t FindMemoryType(uint32_t TypeFilter, VkMemoryPropertyFlags Properties);

	VkBuffer GetVertexBuffer() { return VertexBuffer; }

private:
	FVertexBufferConfig Config;
	VkBuffer			VertexBuffer;
	VkDeviceMemory		VertexBufferMemory;
};
