Carpenter Engine
A C++ game engine with a build once run anywhere solution
Loading...
Searching...
No Matches
Shader.hpp
1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5 */
6
7#ifndef ENGINE_SHADER
8#define ENGINE_SHADER
9
10namespace Engine::Graphics {
11
37 class Shader {
38 private:
39
40 unsigned int m_shaderProgram;
41
42 const char* m_frag;
43 const char* m_vert;
44
45 void CompileShader();
46
47 public:
48
54 Shader();
55
64 Shader(const char* frag);
65
74 Shader(const char* frag, const char* vert);
75
85 unsigned int GetShaderProgram();
86 };
87
93 extern Shader& DefaultShader();
94}
95
96#endif
A class used to load and use shaders.
Definition Shader.hpp:37
Shader()
Default constructor.
Definition Shader.cpp:13
unsigned int GetShaderProgram()
Gets the shader program.
Definition Shader.cpp:101