summaryrefslogtreecommitdiff
path: root/gfx/gl/shader.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-03-03 00:08:47 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-03-03 00:08:47 +0000
commit94311f9c4e82b7475802b1934cc0c5b243e0cd2f (patch)
tree5ef23f6c1151917eb723b67c262da0168e42343c /gfx/gl/shader.h
parentOur own matrix rotations (diff)
downloadilt-94311f9c4e82b7475802b1934cc0c5b243e0cd2f.tar.bz2
ilt-94311f9c4e82b7475802b1934cc0c5b243e0cd2f.tar.xz
ilt-94311f9c4e82b7475802b1934cc0c5b243e0cd2f.zip
Replace Transform with Location
Simpler, unbinds the transformation matrices for location, now done just in the shader.
Diffstat (limited to 'gfx/gl/shader.h')
-rw-r--r--gfx/gl/shader.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gfx/gl/shader.h b/gfx/gl/shader.h
index e4904ed..f1fe705 100644
--- a/gfx/gl/shader.h
+++ b/gfx/gl/shader.h
@@ -7,6 +7,8 @@
#include <glm/glm.hpp>
#include <string_view>
+class Location;
+
class Shader {
public:
enum class Program { Basic = 0, Water = 1, LandMass = 2 };
@@ -14,7 +16,7 @@ public:
Shader();
void setView(glm::mat4 view) const;
- void setModel(glm::mat4 model, Program = Program::Basic) const;
+ void setModel(const Location &, Program = Program::Basic) const;
void setUniform(const GLchar *, glm::vec3 dir) const;
static void CheckShaderError(GLuint shader, GLuint flag, bool isProgram, std::string_view errorMessage);