diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-17 19:36:30 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-17 22:16:48 +0000 |
commit | 0bf4ad9e4a9e1c97e92aa23a365405dfef89bd7c (patch) | |
tree | 68a80976a247836bbb1eecc835af437e3489fbb7 /shader.h | |
parent | First cut modernizing and sanitizing (diff) | |
download | ilt-0bf4ad9e4a9e1c97e92aa23a365405dfef89bd7c.tar.bz2 ilt-0bf4ad9e4a9e1c97e92aa23a365405dfef89bd7c.tar.xz ilt-0bf4ad9e4a9e1c97e92aa23a365405dfef89bd7c.zip |
Big reshuffle
Fixes code quality warnings now picked up.
Diffstat (limited to 'shader.h')
-rw-r--r-- | shader.h | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/shader.h b/shader.h deleted file mode 100644 index 85a7d58..0000000 --- a/shader.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef SHADER_INCLUDED_H
-#define SHADER_INCLUDED_H
-
-#include <GL/glew.h>
-#include <array>
-#include <string>
-
-class Camera;
-class Transform;
-
-class Shader {
-public:
- explicit Shader(const std::string & fileName);
- virtual ~Shader();
- void operator=(const Shader &) = delete;
- Shader(const Shader &) = delete;
-
- void Bind() const;
- void Update(const Transform & transform, const Camera & camera) const;
-
-private:
- static constexpr unsigned int NUM_SHADERS = 2;
- static constexpr unsigned int NUM_UNIFORMS = 3;
-
- static void CheckShaderError(GLuint shader, GLuint flag, bool isProgram, const std::string & errorMessage);
- static GLuint CreateShader(const GLchar * text, GLint len, unsigned int type);
-
- GLuint m_program;
- std::array<GLuint, NUM_SHADERS> m_shaders;
- std::array<GLint, NUM_UNIFORMS> m_uniforms;
-};
-
-#endif
|