summaryrefslogtreecommitdiff
path: root/inc/geoshader.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'inc/geoshader.hpp')
-rw-r--r--inc/geoshader.hpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/inc/geoshader.hpp b/inc/geoshader.hpp
index f8be43b..65e2fc3 100644
--- a/inc/geoshader.hpp
+++ b/inc/geoshader.hpp
@@ -3,29 +3,27 @@
#include <string>
#include <GL/glew.h>
-#include "graphicsobjects.hpp"
-//#define GLSL(src) "#version 150 core\n" #src
+#include "constants.hpp"
+#include "graphicsobjects.hpp"
class GeoShader
{
- public:
- GeoShader(const std::string& fileName);
+ public:
+ GeoShader(const std::string& fileName);
- void Bind();
- void Update(const Transform& transform, const Camera& camera);
- virtual ~GeoShader();
- GLuint m_program;
+ void Bind();
+ void Update(const Transform& transform, const Camera& camera);
+ virtual ~GeoShader();
+ GLuint m_program;
- private:
- static const unsigned int NUM_SHADERS = 3;
- static const unsigned int NUM_UNIFORMS = 3;
- 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);
+ 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];
+ GLuint m_shaders[NUM_SHADERS];
+ GLuint m_uniforms[NUM_UNIFORMS];
};
#endif