From 2cc21176467d4501adb7bfb9ee03eb9a2a7d14f2 Mon Sep 17 00:00:00 2001 From: majortom6 Date: Sun, 19 Feb 2017 08:06:37 -0600 Subject: -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 --- inc/geoshader.hpp | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'inc/geoshader.hpp') 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 #include -#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 -- cgit v1.2.3