Files
OpenVulkano/openVulkanoCpp/Shader/ShaderCompiler.hpp
Metehan Tuncbilek 7ea6fc8dc4 review fix done
2024-07-16 22:13:44 +03:00

25 lines
776 B
C++

#pragma once
#include "Base/Utils.hpp"
#include "Base/Wrapper.hpp"
namespace OpenVulkano
{
class ShaderCompiler
{
public:
/**
* @param absPath - absolute path of the shader that needs to be compiled
* @param incPath - include path that will be used to resolve includes
* @param entryPoint - the name of the void function in the shader
* @param shaderStage - type of the shader that needs to be compiled
*/
static Array<uint32_t> CompileGLSLToSpirv(const std::string& absPath, bool hasIncludes,
const std::string& incPath = std::string(), const std::string& entryPoint = "main")
#if defined(HAS_SHADERC)
;
#else
{ throw std::runtime_error("Shader compiler is not available on this platform"); }
#endif
};
}