blob: ba7da094fa3b44586b0945f1c75b1233d973e37d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include <GL/glew.h>
#include <string>
#include <vector>
#include <fstream> // ifstream
#include <sstream> // stringstream
#include <iostream>
# ifndef NDEBUG
#define SHADERS_RESOURCES "../resources/shaders/"
#else
#define SHADERS_RESOURCES "resources/shaders/"
#endif
/**
* Compile a shader:
* - Shader should contains both vertex and fragment code
* - Vertex code should begin with: // ----- Vertex Shader -----
* - Fragment code should begin with: // ----- Fragment Shader -----
* @param shader_path
* @return The generated program id
*/
GLuint CompileShader(std::string shader_path);
|