GPU Splatting  1.0
A deffered render that draws the surface of point cloud data.
GLShader.h
1 #pragma once
2 
3 #include <string>
4 #include <iostream>
5 #include <fstream>
6 
7 #include <GL/glew.h>
8 
9 namespace GL
10 {
11  enum GLShaderType
12  {
13  VERTEX_SHADER = GL_VERTEX_SHADER,
14  FRAGMENT_SHADER = GL_FRAGMENT_SHADER,
15  GEOMETRY_SHADER = GL_GEOMETRY_SHADER,
16  TESS_EVALUATION_SHADER = GL_TESS_EVALUATION_SHADER,
17  TESS_CONTROL_SHADER = GL_TESS_CONTROL_SHADER
18  };
19 
21  class GLShader
22  {
23  friend class GLProgram;
24  public:
26 
30  explicit GLShader(const char* filename, GLShaderType _type);
31 
33 
37  explicit GLShader(const std::string& filename, GLShaderType _type);
38 
40  ~GLShader();
41 
42  private:
43  GLShaderType type;
44  GLuint handle;
45  };
46 
47  std::string readFile(const char *filePath);
48 }
Encapsules an OpenGL shader program.
Definition: GLProgram.h:14
GLShader(const char *filename, GLShaderType _type)
Creates a new Shader by reading the given file and compiling it.
Definition: GLShader.cpp:29
Encapsuls an OpenGL shader.
Definition: GLShader.h:21
~GLShader()
Delets the shader.
Definition: GLShader.cpp:64
Definition: GLProgram.h:11