SpiecsEngine
 
Loading...
Searching...
No Matches
Shader.cpp
Go to the documentation of this file.
1/**
2* @file Shader.cpp.
3* @brief The Shader Class Implementation.
4* @author Spices.
5*/
6
7#include "Pchheader.h"
8#include "Shader.h"
9
10namespace Spices {
11
12 Shader::Shader(const std::string& name, ShaderStage stage)
13 : m_ShaderName(name)
14 , m_ShaderStage(stage)
15 {
17
18 /**
19 * @breif Call Dserialize() while in Constructor.
20 */
22 }
23
24 Shader::Shader(const std::string& name, const std::string& stage)
25 : m_ShaderName(name)
27 {
29
30 /**
31 * @breif Call Dserialize() while in Constructor.
32 */
34 }
35
37 {
39
40 if (m_ShaderName.empty())
41 {
42 SPICES_CORE_WARN("Shader::m_ShaderName is empty.")
43 return;
44 }
45
47 }
48}
#define SPICES_PROFILE_ZONE
static ShaderStage ToStage(std::string stage)
Convert String to ShaderStage.
ShaderHelper Class.
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.
ShaderStage m_ShaderStage
Shader stage.
Definition Shader.h:67
Shader(const std::string &name, ShaderStage stage)
Constructor Function.
Definition Shader.cpp:12
Shader(const std::string &name, const std::string &stage)
Constructor Function.
Definition Shader.cpp:24
std::string m_ShaderName
Shader name.
Definition Shader.h:62
void Deserialize()
Deserialize the data from a disk file to this class.
Definition Shader.cpp:36
Shader Class.
Definition Shader.h:19
ShaderStage
enum of shader stage.