blob: 82f7e7ad4a1d367c46a1e3dce5a4d9de22d3b49d (
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>
#include "shader/util.h"
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 fragment);
~GraphicShader();
GLuint setUniform(const std::string& name, int value) const;
GLuint setUniform(const std::string& name, const std::vector<GLuint>& v) const;
GLuint setUniform(const std::string& name, glm::mat4& M) const;
};
|