#pragma once

/*
	VulkanFramework
	by John Ryland
	Copyright (c) 2023
*/

////////////////////////////////////////////////////////////////////////////////////
//	Vulkan Pipeline

#include "VulkanDevice.h"
#include <functional>

namespace Vulkan {

class Pipeline
{
public:
    Pipeline();
    virtual ~Pipeline();

    virtual void CreateLayout(Device* device);
    virtual void Initialize(Device*               device,
                            VkShaderModule        vertexShader,
                            VkShaderModule        fragmentShader,
                            VkSampleCountFlagBits msaaSamples,
                            bool                  cullEnabled = true,
                            bool                  depthEnabled = true,
                            bool                  blendEnabled = false);
    virtual void Destroy();

    Device*                                         m_owner;
    VkPipeline                                      m_pipeline;
    VkPipelineCreateFlags                           m_pipelineFlags;
    VkPipelineLayout                                m_pipelineLayout;
    VkDescriptorSetLayout*                          m_descriptorSetLayout;
    VkRenderPass                                    m_renderPass;
    uint32_t                                        m_subpass;
    std::vector<VkVertexInputBindingDescription>    m_vertexBindingDescriptions;
    std::vector<VkVertexInputAttributeDescription>  m_vertexAttributeDescriptions;
};

} // Vulkan namespace
