-
Notifications
You must be signed in to change notification settings - Fork 0
/
Shader.h
32 lines (24 loc) · 793 Bytes
/
Shader.h
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
#ifndef SHADER_H
#define SHADER_H
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtc/type_ptr.hpp"
#include <GL/glew.h>
#include <GL/gl.h>
#define GLEW_STATIC
class Shader{
public:
unsigned int ID;
Shader(const GLchar* vertexPath, const GLchar* fragmentPath);
Shader(const GLchar* vertexPath, const GLchar* tessControlPath, const GLchar* tessEvalPath, const GLchar* geometryPath, const GLchar* fragmentPath);
void use();
void setBool(const std::string &name, bool value) const;
void setInt(const std::string &name, int value) const;
void setFloat(const std::string &name, float value) const;
void setVec3(const std::string &name, glm::vec3 value) const;
};
#endif