-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelper.h
35 lines (24 loc) · 789 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
#ifndef __HELPER__H__
#define __HELPER__H__
#define GLEW_STATIC
#include <cassert>
#include <vector>
#include <iostream>
#include <string>
#include <fstream>
#include <jpeglib.h>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
extern GLuint idProgramShader;
extern GLuint idFragmentShader;
extern GLuint idVertexShader;
extern GLuint idJpegTexture;
extern GLuint idHeightTexture;
using namespace std;
void initShaders(GLuint &programID, std::string &vertFile, std::string &fragFile);
GLuint initVertexShader(const string& filename);
GLuint initFragmentShader(const string& filename);
GLuint initGeomShader(const string& filename);
bool readDataFromFile(const string& fileName, string &data);
void initTexture(char *height_map_file, char *texture_map_file, int *w, int *h);
#endif