From f848ad0e672d913c36fcb86533cbc11a9cf9d9ea Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 3 Nov 2022 18:25:28 +0000 Subject: Rename Shader to SceneShader --- ui/editNetwork.cpp | 8 ++++---- ui/editNetwork.h | 4 ++-- ui/gameMainSelector.cpp | 4 ++-- ui/gameMainSelector.h | 4 ++-- ui/gameMainWindow.cpp | 2 +- ui/gameMainWindow.h | 6 +++--- ui/sceneRenderer.h | 2 +- ui/window.h | 4 ++-- ui/worldOverlay.h | 4 ++-- 9 files changed, 19 insertions(+), 19 deletions(-) (limited to 'ui') diff --git a/ui/editNetwork.cpp b/ui/editNetwork.cpp index 277407f..991cbc3 100644 --- a/ui/editNetwork.cpp +++ b/ui/editNetwork.cpp @@ -5,7 +5,7 @@ #include "text.h" #include #include -#include +#include #include constexpr const glm::u8vec4 TRANSPARENT_BLUE {30, 50, 255, 200}; @@ -47,17 +47,17 @@ EditNetwork::handleInput(const SDL_Event & e, const UIComponent::Position & pare } void -EditNetwork::render(const Shader & shader) const +EditNetwork::render(const SceneShader & shader) const { if (builder) { blue.bind(); - shader.setModel(Location {}, Shader::Program::StaticPos); + shader.setModel(Location {}, SceneShader::Program::StaticPos); builder->render(shader); } } void -EditNetwork::Builder::render(const Shader & shader) const +EditNetwork::Builder::render(const SceneShader & shader) const { candidateLinks.apply(&Renderable::render, shader); } diff --git a/ui/editNetwork.h b/ui/editNetwork.h index 3501ac9..1ba2e13 100644 --- a/ui/editNetwork.h +++ b/ui/editNetwork.h @@ -18,7 +18,7 @@ public: bool click(const SDL_MouseButtonEvent & e, const Ray &) override; bool move(const SDL_MouseMotionEvent & e, const Ray &) override; bool handleInput(const SDL_Event & e, const UIComponent::Position &) override; - void render(const Shader &) const override; + void render(const SceneShader &) const override; void render(const UIShader & shader, const UIComponent::Position & pos) const override; using NetworkClickPos = std::variant; @@ -26,7 +26,7 @@ public: class Builder { public: virtual ~Builder() = default; - virtual void render(const Shader & shader) const; + virtual void render(const SceneShader & shader) const; virtual std::string hint() const = 0; virtual void click(Network *, const GeoData *, const SDL_MouseButtonEvent &, const Ray &) = 0; virtual void move(Network *, const GeoData *, const SDL_MouseMotionEvent &, const Ray &) = 0; diff --git a/ui/gameMainSelector.cpp b/ui/gameMainSelector.cpp index a5356ab..0fbf687 100644 --- a/ui/gameMainSelector.cpp +++ b/ui/gameMainSelector.cpp @@ -29,7 +29,7 @@ GameMainSelector::render(const UIShader & shader, const Position & parentPos) co } void -GameMainSelector::render(const Shader & shader) const +GameMainSelector::render(const SceneShader & shader) const { if (target) { target->render(shader); @@ -112,6 +112,6 @@ GameMainSelector::Component::render(const UIShader &, const UIComponent::Positio } void -GameMainSelector::Component::render(const Shader &) const +GameMainSelector::Component::render(const SceneShader &) const { } diff --git a/ui/gameMainSelector.h b/ui/gameMainSelector.h index 38d8eb1..9c05127 100644 --- a/ui/gameMainSelector.h +++ b/ui/gameMainSelector.h @@ -21,13 +21,13 @@ public: virtual bool move(const SDL_MouseMotionEvent &, const Ray &); virtual bool handleInput(const SDL_Event &, const Position & pos); virtual void render(const UIShader & shader, const Position & pos) const; - virtual void render(const Shader &) const; + virtual void render(const SceneShader &) const; }; GameMainSelector(const Camera * c, glm::vec2 size); void render(const UIShader & shader, const Position & pos) const override; - void render(const Shader & shader) const override; + void render(const SceneShader & shader) const override; bool handleInput(const SDL_Event & e, const Position &) override; diff --git a/ui/gameMainWindow.cpp b/ui/gameMainWindow.cpp index c08588d..792ffab 100644 --- a/ui/gameMainWindow.cpp +++ b/ui/gameMainWindow.cpp @@ -59,7 +59,7 @@ GameMainWindow::render() const Window::render(); } -const Shader & +const SceneShader & GameMainWindow::getShader() const { return shader; diff --git a/ui/gameMainWindow.h b/ui/gameMainWindow.h index 2c2c501..09d17d1 100644 --- a/ui/gameMainWindow.h +++ b/ui/gameMainWindow.h @@ -2,7 +2,7 @@ #include "chronology.hpp" #include "gfx/gl/camera.h" -#include "gfx/gl/shader.h" +#include "gfx/gl/sceneShader.h" #include "sceneRenderer.h" #include "window.h" #include @@ -16,7 +16,7 @@ public: void render() const override; private: - const Shader & getShader() const override; - Shader shader; + const SceneShader & getShader() const override; + SceneShader shader; Camera camera; }; diff --git a/ui/sceneRenderer.h b/ui/sceneRenderer.h index 1c01069..6176f1b 100644 --- a/ui/sceneRenderer.h +++ b/ui/sceneRenderer.h @@ -1,6 +1,6 @@ #pragma once -#include "gfx/gl/shader.h" +#include "gfx/gl/sceneShader.h" #include "lib/glArrays.h" #include diff --git a/ui/window.h b/ui/window.h index dc3c528..b3d3f68 100644 --- a/ui/window.h +++ b/ui/window.h @@ -10,7 +10,7 @@ #include #include -class Shader; +class SceneShader; class Window { public: @@ -30,7 +30,7 @@ public: protected: [[nodiscard]] SDL_GLContext glContext() const; virtual void render() const; - virtual const Shader & getShader() const = 0; + virtual const SceneShader & getShader() const = 0; using SDL_WindowPtr = wrapped_ptrt; const glm::ivec2 size; diff --git a/ui/worldOverlay.h b/ui/worldOverlay.h index 028122a..18fab3f 100644 --- a/ui/worldOverlay.h +++ b/ui/worldOverlay.h @@ -1,9 +1,9 @@ #pragma once -class Shader; +class SceneShader; class WorldOverlay { public: virtual ~WorldOverlay() = default; - virtual void render(const Shader &) const = 0; + virtual void render(const SceneShader &) const = 0; }; -- cgit v1.2.3