Even more shader stuff!
This commit is contained in:
36
cve_pipeline.hpp
Normal file
36
cve_pipeline.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include "cve_device.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace cve {
|
||||
struct PipelineConfigInfo {
|
||||
|
||||
};
|
||||
class CvePipeline {
|
||||
public:
|
||||
CvePipeline(CveDevice &device, const std::string& vertFilepath,
|
||||
const std::string& fragFilepath, const PipelineConfigInfo &configInfo);
|
||||
~CvePipeline() {};
|
||||
|
||||
CvePipeline(const CvePipeline&) = delete;
|
||||
void operator=(const CvePipeline&) = delete;
|
||||
|
||||
static PipelineConfigInfo defaultPipelineConfigInfo(uint32_t width, uint32_t height);
|
||||
|
||||
private:
|
||||
static std::vector<char> readFile(const std::string& filepath);
|
||||
|
||||
void createGraphicsPipeline(const std::string& vertFilepath,
|
||||
const std::string& fragFilepath, const PipelineConfigInfo &configInfo);
|
||||
|
||||
void createShaderModule(const std::vector<char>& code, VkShaderModule *shaderModule);
|
||||
|
||||
CveDevice& cveDevice;
|
||||
VkPipeline graphicsPipeline;
|
||||
VkShaderModule vertShaderModule;
|
||||
VkShaderModule fragShaderModule;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user