From 56d0787bf26c64f83a2616a5eff0b15f2e3066e0 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 11 Dec 2022 14:07:02 +0000 Subject: Fix case of GetViewProjection --- gfx/gl/camera.cpp | 2 +- gfx/gl/camera.h | 2 +- gfx/gl/sceneRenderer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/gl/camera.cpp b/gfx/gl/camera.cpp index c751ba8..7438739 100644 --- a/gfx/gl/camera.cpp +++ b/gfx/gl/camera.cpp @@ -9,7 +9,7 @@ Camera::Camera(glm::vec3 pos, float fov, float aspect, float zNear, float zFar) } glm::mat4 -Camera::GetViewProjection() const +Camera::getViewProjection() const { return projection * glm::lookAt(pos, pos + forward, up); } diff --git a/gfx/gl/camera.h b/gfx/gl/camera.h index b4dd0d5..e22d23f 100644 --- a/gfx/gl/camera.h +++ b/gfx/gl/camera.h @@ -7,7 +7,7 @@ class Camera { public: Camera(glm::vec3 pos, float fov, float aspect, float zNear, float zFar); - [[nodiscard]] glm::mat4 GetViewProjection() const; + [[nodiscard]] glm::mat4 getViewProjection() const; [[nodiscard]] Ray unProject(const glm::vec2 &) const; glm::vec3 pos; diff --git a/gfx/gl/sceneRenderer.cpp b/gfx/gl/sceneRenderer.cpp index ecf83a0..b3f2c47 100644 --- a/gfx/gl/sceneRenderer.cpp +++ b/gfx/gl/sceneRenderer.cpp @@ -55,7 +55,7 @@ SceneRenderer::SceneRenderer(glm::ivec2 s, GLuint o) : void SceneRenderer::render(const SceneProvider & scene) const { - shader.setViewProjection(camera.GetViewProjection()); + shader.setViewProjection(camera.getViewProjection()); glViewport(0, 0, size.x, size.y); // Geometry pass -- cgit v1.2.3