diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-24 16:36:02 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-24 16:36:02 +0000 |
commit | 1c3e7e81049efefe8b54e4d4a719feeda995b474 (patch) | |
tree | 3a5474dfbc515c16589ae6863fba1116d7b83ec3 /gfx/gl/shader.h | |
parent | Big tidy up of shader wrapper (diff) | |
download | ilt-1c3e7e81049efefe8b54e4d4a719feeda995b474.tar.bz2 ilt-1c3e7e81049efefe8b54e4d4a719feeda995b474.tar.xz ilt-1c3e7e81049efefe8b54e4d4a719feeda995b474.zip |
Remove the weird view/model/camera connectedness
Diffstat (limited to 'gfx/gl/shader.h')
-rw-r--r-- | gfx/gl/shader.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gfx/gl/shader.h b/gfx/gl/shader.h index e253f50..a839b9b 100644 --- a/gfx/gl/shader.h +++ b/gfx/gl/shader.h @@ -3,17 +3,16 @@ #include <GL/glew.h>
#include <glRef.hpp>
+#include <glm/glm.hpp>
#include <string_view>
-class Camera;
-class Transform;
-
class Shader {
public:
Shader();
void Bind() const;
- void Update(const Transform & transform, const Camera & camera) const;
+ void setView(glm::mat4 view) const;
+ void setModel(glm::mat4 model) const;
private:
class Source {
@@ -31,7 +30,7 @@ private: using ProgramRef = glRef<GLuint, __glewCreateProgram, __glewDeleteProgram>;
ProgramRef m_program;
- GLint mvp_uniform, normal_uniform, lightDir_uniform;
+ GLint viewProjection_uniform, model_uniform, lightDir_uniform;
};
#endif
|