Practical Tools for Simple Design
Loading...
Searching...
No Matches
Shader.hpp
1#ifndef CORE_SHADER_HPP
2#define CORE_SHADER_HPP
3
4#include "pch.hpp" // IWYU pragma: export
5
6namespace Core {
10class Shader {
11public:
12 enum class Type {
13 VERTEX = GL_VERTEX_SHADER,
14 FRAGMENT = GL_FRAGMENT_SHADER,
15 };
16
17 Shader(const std::string &filepath, Type shaderType);
18 Shader(const Shader &) = delete;
19 Shader(Shader &&other);
20
21 ~Shader();
22
23 Shader &operator=(const Shader &) = delete;
24 Shader &operator=(Shader &&other);
25
26 GLuint GetShaderId() const { return m_ShaderId; }
27
28private:
29 void Compile(const std::string &src) const;
30 void CheckStatus(const std::string &filepath) const;
31
32 GLuint m_ShaderId;
33};
34} // namespace Core
35
36#endif
Definition: Shader.hpp:10
Core functionality of the framework
Definition: config.hpp:7