-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshaderProgram.h
More file actions
55 lines (43 loc) · 1.32 KB
/
Copy pathshaderProgram.h
File metadata and controls
55 lines (43 loc) · 1.32 KB
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
45
46
47
48
49
50
51
52
53
54
55
#include <GL/glew.h>
#include <glm/ext.hpp>
#include <string>
#include <memory>
struct vertexArray;
struct camera;
struct orbitLight;
struct shaderProgram
{
public:
enum SHADERTYPE
{
SHADER_SUPER_BASIC,
SHADER_BASIC,
SHADER_LIGHT,
SHADER_ORTHO
};
shaderProgram(std::string _vertexPath, std::string _fragementPath);
shaderProgram(SHADERTYPE type);
void update(glm::mat4 _proj, glm::mat4 _view, glm::mat4 _model, vertexArray &vaoID, GLuint texID);
void update(glm::mat4 _proj, std::shared_ptr<camera> _camera, glm::mat4 _model, vertexArray& vaoID, GLuint texID);
void update(glm::mat4 _proj, glm::mat4 _view, glm::mat4 _model, std::shared_ptr<vertexArray> vaoID, GLuint texID);
void update(glm::mat4 _proj, std::shared_ptr<vertexArray> vaoId, GLuint texId);
void update(glm::mat4 _proj, glm::mat4 _view, glm::mat4 _model, std::shared_ptr<vertexArray> vaoID, GLuint texID, std::shared_ptr<orbitLight> light);
GLuint getId();
private:
SHADERTYPE programType;
GLuint id;
std::string inputBuffer;
//std::shared_ptr<vertexArray> data;
const GLchar* readShader(std::string _path);
glm::vec3 lightColour;
glm::vec3 lightPos;
glm::vec3 cameraPos;
float ambientStrength;
GLuint modelRef;
GLuint viewRef;
GLuint projRef;
GLuint lightColourRef;
GLuint ambientStrengthRef;
GLuint lightPosRef;
GLuint cameraPosRef;
};