#pragma once
#include "../vulkan.h"

namespace vulkanapi {
	class Device;
	class SwapchainCreator {
		friend class Swapchain;
	public:
		int frames;
		uint32_t width;
		uint32_t height;
		string title;
		VkFormat imageFormat;
		VkColorSpaceKHR imageColorSpace;
		VkPresentModeKHR presentMode;
		VkImageUsageFlags imageUsage;
		uint32_t maxFrameInFlightCount;

	public:
		VkSurfaceKHR presentation_surface;
		Device& device;
	public:
		SwapchainCreator(Device& device,int frames,uint32_t width, uint32_t height, VkSurfaceKHR presentation_surface);
		
		VkExtent2D EnableImageExtent2D(VkSurfaceCapabilitiesKHR& capabilities);
		bool CreateSwapchainImages(VkSwapchainKHR swapchain,vector<VkImage>& swapchain_images);
	};
};