Files
OpenVulkano/openVulkanoCpp/Shader/ShaderCompiler.hpp
2025-02-11 17:34:12 +02:00

26 lines
867 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
*/
[[deprecated]] 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
};
}