blob: 83fca3466f4a8b610e91efd23aecbff7411464ac (
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
|
#pragma once
#include <vector>
#include <string>
#include <GL/glew.h>
#include <glm/glm.hpp>
class GraphicShader {
private:
const GLuint _id;
public:
struct Guard {
const GLuint _id;
Guard(GLuint id);
~Guard();
};
Guard use() const;
GraphicShader(const std::string& vertex, const std::string& geometry, const std::string fragment);
GraphicShader(const std::string& vertex, const std::string fragment);
~GraphicShader();
GLuint setUniform(const std::string& name, int value) const;
GLuint setUniform(const std::string& name, GLuint value) const;
GLuint setUniform(const std::string& name, const std::vector<GLuint>& v) const;
GLuint setUniform(const std::string& name, glm::mat4& M) const;
};
|