#pragma once

#include <array>
#include <future>

#include <vulkan/vulkan.hpp>

#include "../../../api/util/os_specific_data.h"

namespace Vingine {

	class VulkanSurface {
	public:
		VulkanSurface(const vk::Instance & vkInstance,
					  std::future<OSSpecificInstanceAndWindowHandle> && osData);
		VulkanSurface(const VulkanSurface &) = delete;
		VulkanSurface(VulkanSurface &&) = delete;
		~VulkanSurface();

		const vk::SurfaceKHR & GetVulkanHandle() const { return mVkSurface; }
		const vk::SurfaceKHR * operator->() const { return &mVkSurface; }

	private:

		/*
			Called only once during construction
		*/
		vk::SurfaceKHR CreateSurface(std::future<OSSpecificInstanceAndWindowHandle> && osData);

		const vk::Instance & mVkInstance;

		const vk::SurfaceKHR mVkSurface;
	};
}