SpiecsEngine
 
Loading...
Searching...
No Matches
ShaderCompiler.h
Go to the documentation of this file.
1/**
2* @file ShaderCompiler.h.
3* @brief The ShaderCompiler Class Definitions.
4* @author Spices.
5*/
6
7#pragma once
8#include "Core/Core.h"
9#include "ShaderHelper.h"
10
11namespace Spices {
12
13 /**
14 * @brief Wrapper of shaderc compiler.
15 */
17 {
18 public:
19
20 /**
21 * @brief Compile glsl to spv.
22 * @param[in] data glsl data.
23 * @param[in] stage ShaderStage.
24 * @param[in] name Shader Name.
25 * @param[in,out] spirv spv data.
26 */
27 static void CompileToSPV(
28 const std::string& data ,
29 const ShaderStage& stage ,
30 const std::string& name ,
31 std::vector<uint8_t>& spirv
32 );
33 };
34
35}
#define SPICES_PROFILE_ZONE
static void CompileToSPV(const std::string &data, const ShaderStage &stage, const std::string &name, std::vector< uint8_t > &spirv)
Compile glsl to spv.
Wrapper of shaderc compiler.
static bool Load(const std::string &fileName, ShaderStage stage, Shader *outShader)
Public called API, it is entrance.
ShaderLoader Class. This class only defines static function for load data from shader file.
Shader Class.
Definition Shader.h:19
ShaderStage
enum of shader stage.
const std::string defaultShaderPath
Const variable: Original Shader File Path.