From 1c3e7e81049efefe8b54e4d4a719feeda995b474 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 24 Jan 2021 16:36:02 +0000 Subject: Remove the weird view/model/camera connectedness --- gfx/gl/shader.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gfx/gl/shader.h') 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 #include +#include #include -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; ProgramRef m_program; - GLint mvp_uniform, normal_uniform, lightDir_uniform; + GLint viewProjection_uniform, model_uniform, lightDir_uniform; }; #endif -- cgit v1.2.3