From 9c1fee14b25ad552ef36f9f08ff93bd3f02597e1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 23 Nov 2022 17:34:55 +0000 Subject: Rename setView to setViewProjection to avoid ambiguity --- gfx/gl/sceneShader.cpp | 6 +++--- gfx/gl/sceneShader.h | 4 ++-- ui/sceneRenderer.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gfx/gl/sceneShader.cpp b/gfx/gl/sceneShader.cpp index bec6553..b20b1db 100644 --- a/gfx/gl/sceneShader.cpp +++ b/gfx/gl/sceneShader.cpp @@ -17,15 +17,15 @@ SceneShader::SceneShader() : } void -SceneShader::setView(glm::mat4 proj) const +SceneShader::setViewProjection(const glm::mat4 & viewProjection) const { for (const auto & prog : std::array {&basic, &water, &landmass, &absolute}) { - prog->setView(proj); + prog->setViewProjection(viewProjection); } } void -SceneShader::SceneProgram::setView(const glm::mat4 & viewProjection) const +SceneShader::SceneProgram::setViewProjection(const glm::mat4 & viewProjection) const { glUseProgram(*this); glUniformMatrix4fv(viewProjectionLoc, 1, GL_FALSE, glm::value_ptr(viewProjection)); diff --git a/gfx/gl/sceneShader.h b/gfx/gl/sceneShader.h index 2951e85..8094e0a 100644 --- a/gfx/gl/sceneShader.h +++ b/gfx/gl/sceneShader.h @@ -12,7 +12,7 @@ class SceneShader { { } - void setView(const glm::mat4 &) const; + void setViewProjection(const glm::mat4 &) const; private: RequiredUniformLocation viewProjectionLoc; @@ -51,5 +51,5 @@ public: WaterProgram water; AbsolutePosProgram landmass, absolute; - void setView(glm::mat4 proj) const; + void setViewProjection(const glm::mat4 & viewProjection) const; }; diff --git a/ui/sceneRenderer.cpp b/ui/sceneRenderer.cpp index 2202906..ffcc8e3 100644 --- a/ui/sceneRenderer.cpp +++ b/ui/sceneRenderer.cpp @@ -51,7 +51,7 @@ SceneRenderer::SceneRenderer(glm::ivec2 s, GLuint o) : void SceneRenderer::render(const SceneProvider & scene) const { - shader.setView(camera.GetViewProjection()); + shader.setViewProjection(camera.GetViewProjection()); glViewport(0, 0, size.x, size.y); // Geometry pass -- cgit v1.2.3