Even more shader stuff!

This commit is contained in:
2026-02-20 10:24:59 +00:00
parent 3cf8ef62bf
commit e5085cb791
4 changed files with 723 additions and 0 deletions

36
cve_pipeline.hpp Normal file
View 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;
};
}