umbra/projs/shadow/shadow-engine/shadow-renderer/inc/vlkx/render/shader/Pipeline.h
dpeter99 71b95e1ccf
Base of the Module system (#8)
Co-authored-by: Curle <curle@gemwire.uk>
2022-11-26 13:22:36 +00:00

31 lines
813 B
C++

#pragma once
#include <vulkan/vulkan.h>
#include <vector>
#include <fstream>
class Pipeline {
public:
Pipeline();
~Pipeline();
// The active Graphics Pipeline layout.
VkPipelineLayout layout;
// The active Graphics Pipeline instance.
VkPipeline pipeline;
// Create the layout and pipeline for a vertex renderer
void create(VkExtent2D extent, VkDescriptorSetLayout set, VkRenderPass renderPass);
void destroy();
private:
std::vector<char> readFile(const std::string& filename);
VkShaderModule createShaderModule(const std::vector<char>& code);
void createPipelineLayout(VkDescriptorSetLayout set);
// For rendering objects that use traditional vertex-based mesh geometry.
// See Geo::Vertex for the uniform bindings.
void createVertexPipeline(VkExtent2D extent, VkRenderPass renderPass);
};