blob: 47e9689c2396cd6f831013397504720c35bd92a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#ifndef MGLPP_SHADER_HPP
#define MGLPP_SHADER_HPP
#include "../system/vec.hpp"
extern "C" {
#include <mgl/graphics/shader.h>
}
namespace mgl {
class Shader {
public:
enum Type {
Vertex,
Fragment,
Geometry
};
Shader();
~Shader();
bool load_from_file(const char *filepath, Type type);
bool set_uniform(const char *name, vec2f value);
bool is_valid() const;
// If |shader| is nullptr then no shader is used
static void use(Shader *shader);
private:
mgl_shader_program shader_program;
};
}
#endif /* MGLPP_SHADER_HPP */
|