blob: d068a552eeb651519ca1021bd48218dd91855cc8 (
plain)
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
|
#ifndef geoshader_h
#define geoshader_h
#include <string>
#include <GL/glew.h>
#include "constants.hpp"
#include "transform.hpp"
class GeoShader
{
public:
GeoShader(const std::string& fileName);
void Bind();
void Update(const Transform& transform, const Camera& camera);
virtual ~GeoShader();
GLuint m_program;
private:
std::string LoadShader(const std::string& fileName);
void CheckShaderError(GLuint shader, GLuint flag, bool isProgram, const std::string& errorMessage);
GLuint CreateShader(const std::string& text, GLenum shaderType);
GLuint m_shaders[NUM_SHADERS];
GLuint m_uniforms[NUM_UNIFORMS];
};
#endif
|