-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhelper.h
44 lines (31 loc) · 866 Bytes
/
helper.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
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef __HELPER__H__
#define __HELPER__H__
#include <iostream>
#include <string>
#include <fstream>
#include <jpeglib.h>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "glm/glm.hpp" // GL Math library header
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtc/type_ptr.hpp"
#include "glm/gtx/rotate_vector.hpp"
extern GLuint idProgramShader;
extern GLuint idFragmentShader;
extern GLuint idVertexShader;
extern GLuint idJpegTexture;
using namespace std;
void initShaders();
GLuint initVertexShader(const string& filename);
GLuint initFragmentShader(const string& filename);
bool readDataFromFile(const string& fileName, string &data);
void initTexture(char *filename,int *w, int *h);
struct Camera
{
glm::vec3 position;
glm::vec3 gaze;
glm::vec3 up;
void rotateAroundUp(float);
void rotateAroundRight(float);
};
#endif