]> git.localhorst.tv Git - blank.git/blob - src/graphics/Shader.hpp
per block type "gravity"
[blank.git] / src / graphics / Shader.hpp
1 #ifndef BLANK_GRAPHICS_SHADER_HPP_
2 #define BLANK_GRAPHICS_SHADER_HPP_
3
4 #include <iosfwd>
5 #include <GL/glew.h>
6
7
8 namespace blank {
9
10 class Shader {
11
12 public:
13         explicit Shader(GLenum type);
14         ~Shader();
15
16         Shader(Shader &&) noexcept;
17         Shader &operator =(Shader &&) noexcept;
18
19         Shader(const Shader &) = delete;
20         Shader &operator =(const Shader &) = delete;
21
22         void Source(const GLchar *src) noexcept;
23         void Compile() noexcept;
24         bool Compiled() const noexcept;
25         void Log(std::ostream &) const;
26
27         void AttachToProgram(GLuint id) const noexcept;
28
29 private:
30         GLuint handle;
31
32 };
33
34 }
35
36 #endif