18 virtual bool compile(
const std::string& shaderPath)
override;
20 virtual bool compile(
const std::string& vert,
const std::string& frag)
override;
22 bool compileVertexOnly(
const std::string& vertPath);
24 VkShaderModule LoadSPIRV(
const char* path);
26 virtual void bind()
override;
31 inline VkPipelineShaderStageCreateInfo
GetVertexInfo() {
return vertexInfo;}
32 inline VkPipelineShaderStageCreateInfo
GetFragInfo() {
return fragmentInfo;}
35 VkDevice device =
nullptr;
36 VkShaderModule vertShader =
nullptr;
37 VkShaderModule fragShader =
nullptr;
39 VkPipelineShaderStageCreateInfo vertexInfo{};
40 VkPipelineShaderStageCreateInfo fragmentInfo{};
43 VkShaderModule createShaderModule(
const std::vector<char>& code);
45 std::vector<char> ReadFile(
const std::string& path);