-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshader.hpp
44 lines (33 loc) · 953 Bytes
/
shader.hpp
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
35
36
37
38
39
40
41
42
43
44
#ifndef shader_h
#define shader_h
#include <string>
#include <vector>
#include "gl_shared.hpp"
#include "scene.hpp"
using namespace gl;
class shader {
private:
GLuint _program;
static std::string dir;
std::string vertex_shader_name_;
std::string fragment_shader_name_;
std::vector<std::string> feedback_varying_names_;
public:
shader(std::string filename, std::vector<std::string> fbv);
shader(std::string vs_fn, std::string fs_fn, std::vector<std::string> fbv);
shader(std::string filename);
shader(std::string vs_fn, std::string fs_fn);
shader(std::pair<std::string, std::string>);
~shader();
GLuint program() { return _program; }
void use();
void u1f(std::string, float);
void u2f(std::string, glm::vec2);
void u3f(std::string, glm::vec3);
void u4f(std::string, glm::vec4);
void u1i(std::string, GLint);
void u44m(std::string, glm::mat4);
void reload();
static void setdir(std::string);
};
#endif