You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
1.0 KiB

#pragma once
#include <glm/mat4x4.hpp>
#include <vulkan/vulkan.h>
class Instance;
class Pipeline {
public:
VkPipeline handle = VK_NULL_HANDLE;
VkPipelineLayout layout = VK_NULL_HANDLE;
protected:
explicit Pipeline(const std::vector<VkDescriptorSetLayout> &descriptorSetLayouts,
const std::vector<VkPushConstantRange> &pushConstantRanges);
virtual ~Pipeline();
protected:
static VkShaderModule createShaderModule(const std::vector<char> &code);
};
class GraphicsPipeline : public Pipeline {
public:
explicit GraphicsPipeline(const std::string &vertexShaderPath, const std::string &fragmentShaderPath,
VkRenderPass renderPass,
const std::vector<VkDescriptorSetLayout> &descriptorSetLayouts = {},
const std::vector<VkPushConstantRange> &pushConstantRanges = {});
};
class ComputePipeline : public Pipeline {
public:
explicit ComputePipeline(const std::string &shaderFile,
const std::vector<VkDescriptorSetLayout> &descriptorSetLayouts = {},
const std::vector<VkPushConstantRange> &pushConstantRanges = {});
};