#pragma once

#include "../vulkan.h"

namespace vulkanapi {
	class Device;
	class CommandBuffer;
	class RenderTarget;
	class RenderPass {
	protected:
		VkRenderPass mPtr;
		RenderTarget* mTarget;
		VkRenderPassBeginInfo mPassBeginInfo{};
		vector<VkAttachmentDescription> mAttachments;
	public:
		RenderPass(Device& device, const char* name,
			vector<VkAttachmentDescription>& attachments,
			vector<VkSubpassDescription>& subpasses,
			vector<VkSubpassDependency>& dependencies);
		VkRenderPass& Ptr() {
			return mPtr;
		}
	public:
		void BeginPass(CommandBuffer& cmd, int frame);
		void EndPass(CommandBuffer& cmd);
	public:
		void SetViewPort(uint32_t width, uint32_t height, int32_t xoffset, int32_t yoffset);
	};
};