summaryrefslogtreecommitdiff
path: root/inc/geoshader.hpp
diff options
context:
space:
mode:
authormajortom6 <tombarrett@siu.edu>2017-02-19 08:06:37 -0600
committerTom Barrett <tombarrett@siu.edu>2017-03-07 13:23:41 -0600
commit2cc21176467d4501adb7bfb9ee03eb9a2a7d14f2 (patch)
treee12ceac7024bdc697f1ed4adc1a1ece4a82489fc /inc/geoshader.hpp
parent74c6854fd8dcbaee736ac0421805ff1e03c4a1e2 (diff)
-removed all references to sdl_rect and location and now everything now uses our own class rectangle
-standardization of tab spaces to 8 is now in effect -refractoring of graphicsobjects.hpp
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