diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-03 18:25:28 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-03 18:25:28 +0000 |
commit | f848ad0e672d913c36fcb86533cbc11a9cf9d9ea (patch) | |
tree | e8384bdb074a4e3e53fd9a218b9d9910e6a8256d /ui | |
parent | Tidied Scene Renderer (diff) | |
download | ilt-f848ad0e672d913c36fcb86533cbc11a9cf9d9ea.tar.bz2 ilt-f848ad0e672d913c36fcb86533cbc11a9cf9d9ea.tar.xz ilt-f848ad0e672d913c36fcb86533cbc11a9cf9d9ea.zip |
Rename Shader to SceneShader
Diffstat (limited to 'ui')
-rw-r--r-- | ui/editNetwork.cpp | 8 | ||||
-rw-r--r-- | ui/editNetwork.h | 4 | ||||
-rw-r--r-- | ui/gameMainSelector.cpp | 4 | ||||
-rw-r--r-- | ui/gameMainSelector.h | 4 | ||||
-rw-r--r-- | ui/gameMainWindow.cpp | 2 | ||||
-rw-r--r-- | ui/gameMainWindow.h | 6 | ||||
-rw-r--r-- | ui/sceneRenderer.h | 2 | ||||
-rw-r--r-- | ui/window.h | 4 | ||||
-rw-r--r-- | ui/worldOverlay.h | 4 |
9 files changed, 19 insertions, 19 deletions
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 <game/gamestate.h> #include <game/geoData.h> -#include <gfx/gl/shader.h> +#include <gfx/gl/sceneShader.h> #include <gfx/models/texture.h> 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<const Renderable>(&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<glm::vec3, Node::Ptr>; @@ -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 <cstddef> @@ -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 <functional> 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 <special_members.hpp>
#include <string>
-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<SDL_Window, SDL_CreateWindow, SDL_DestroyWindow>;
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; }; |