-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathShader.h
More file actions
46 lines (36 loc) · 703 Bytes
/
Shader.h
File metadata and controls
46 lines (36 loc) · 703 Bytes
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
/*
* Shader.h
*
* Created on: 21/09/2014
* Author: sam
*/
#ifndef SHADER_H_
#define SHADER_H_
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <GL/glew.h>
#include <GL/glut.h>
#define GLM_FORCE_RADIANS
#include "glm/glm.hpp"
#include "glm/gtc/type_ptr.hpp"
class Shader {
public:
GLuint
vertShader, fragShader,
program,
ModelLocation,
ViewLocation,
ProjectionLocation,
VertexLocation,
NormalLocation;
void setModelMatrix(glm::mat4);
void setViewMatrix(glm::mat4);
void setProjectionMatrix(glm::mat4);
Shader(char* vertSource, char* fragSource);
virtual ~Shader();
void use();
};
#endif /* SHADER_H_ */