#pragma once
#include "render/render_context.h"
#include "render/asset/shader.h"
#include "wrapper/renderpass.h"
using namespace engineapi;
namespace vulkanapi {
	class RenderVulkanAPI;
	class VulkanContext : public engineapi::RenderContext {
	public:
		static RenderVulkanAPI* API;
		RenderPass* Pass{ nullptr };
		uint32_t frame;
		VkSemaphore surfaceSemaphore;
		VkSemaphore renderSemaphore;
	public:
		VulkanContext(RenderVulkanAPI* _API){
			API = _API;
		};
		void UseContext()override;

	public:
		static VkDescriptorSetLayout CreateDescriptorSetLayout(const ShaderInfo& info);
		static VkDescriptorSetLayout CreateDescriptorSetLayout(const vector<VkDescriptorSetLayoutBinding>& bindings);

		static VkPipelineLayout CreatePipelineLayout(const vector<VkDescriptorSetLayout>& descriptorSetLayouts, const vector<VkPushConstantRange>& pushConstantRanges);
	};
}