Robotran C Documentation
Shader.hh
Go to the documentation of this file.
1 
6 #ifdef OPEN_GL
7 
8 #ifndef _SHADER_HH_
9 #define _SHADER_HH_
10 
11 #include <string>
12 #include <glew.h>
13 
14 namespace OpenGLMbs{
15 
18 class Shader
19 {
20  public:
21  Shader(std::string vertex_file, std::string fragment_file);
22  Shader(Shader const &copy_shader);
23  ~Shader();
24 
26  GLuint ProgramID() const { return program_id; }
27 
29  std::string VertexFile() const { return vertex_file; }
30 
32  std::string FragmentFile() const { return fragment_file; }
33 
34  private:
35  GLuint vertex_id;
36  GLuint fragment_id;
37  GLuint program_id;
38 
39  std::string vertex_file;
40  std::string fragment_file;
41 
42  // function prototype
43  void CompileLink();
44  void Compile(GLuint &shader, GLenum type, std::string const &fichierSource);
45 };
46 
47 }
48 #endif
49 #endif
OpenGLMbs
Definition: MpegFrameCaptureOptions.hh:6
Shader.hh
Shader class.