diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-03 18:25:28 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-03 18:25:28 +0000 |
commit | f848ad0e672d913c36fcb86533cbc11a9cf9d9ea (patch) | |
tree | e8384bdb074a4e3e53fd9a218b9d9910e6a8256d /gfx/gl/sceneShader.h | |
parent | Tidied Scene Renderer (diff) | |
download | ilt-f848ad0e672d913c36fcb86533cbc11a9cf9d9ea.tar.bz2 ilt-f848ad0e672d913c36fcb86533cbc11a9cf9d9ea.tar.xz ilt-f848ad0e672d913c36fcb86533cbc11a9cf9d9ea.zip |
Rename Shader to SceneShader
Diffstat (limited to 'gfx/gl/sceneShader.h')
-rw-r--r-- | gfx/gl/sceneShader.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gfx/gl/sceneShader.h b/gfx/gl/sceneShader.h new file mode 100644 index 0000000..61c159b --- /dev/null +++ b/gfx/gl/sceneShader.h @@ -0,0 +1,27 @@ +#pragma once
+
+#include "programHandle.h"
+#include <GL/glew.h>
+#include <array>
+#include <glm/glm.hpp>
+
+class Location;
+
+class SceneShader {
+public:
+ enum class Program { Basic = 0, Water = 1, LandMass = 2, StaticPos = 3 };
+
+ SceneShader();
+
+ void setView(glm::mat4 view) const;
+ void setModel(const Location &, Program = Program::Basic) const;
+ void setUniform(const GLchar *, glm::vec3 dir) const;
+
+private:
+ class ProgramHandle : public ProgramHandleBase {
+ public:
+ ProgramHandle(GLuint, GLuint);
+ };
+
+ std::array<ProgramHandle, 4> programs;
+};
|