blob: 2619a922af0d6eac77746489477d482a690cf504 (
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
30
|
#ifndef geoshader_h
#define geoshader_h
#include <string>
#include <GL/glew.h>
#include "constants.hpp"
#include "graphicsdata.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
|