#pragma once #include #include class Instance; class Pipeline { public: VkPipeline handle = VK_NULL_HANDLE; VkPipelineLayout layout = VK_NULL_HANDLE; protected: explicit Pipeline(const std::vector &descriptorSetLayouts, const std::vector &pushConstantRanges); virtual ~Pipeline(); protected: static VkShaderModule createShaderModule(const std::vector &code); }; class GraphicsPipeline : public Pipeline { public: explicit GraphicsPipeline(const std::string &vertexShaderPath, const std::string &fragmentShaderPath, VkRenderPass renderPass, const std::vector &descriptorSetLayouts = {}, const std::vector &pushConstantRanges = {}); }; class ComputePipeline : public Pipeline { public: explicit ComputePipeline(const std::string &shaderFile, const std::vector &descriptorSetLayouts = {}, const std::vector &pushConstantRanges = {}); };