summaryrefslogtreecommitdiff
path: root/game/vehicles
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-11-03 18:25:28 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-11-03 18:25:28 +0000
commitf848ad0e672d913c36fcb86533cbc11a9cf9d9ea (patch)
treee8384bdb074a4e3e53fd9a218b9d9910e6a8256d /game/vehicles
parentTidied Scene Renderer (diff)
downloadilt-f848ad0e672d913c36fcb86533cbc11a9cf9d9ea.tar.bz2
ilt-f848ad0e672d913c36fcb86533cbc11a9cf9d9ea.tar.xz
ilt-f848ad0e672d913c36fcb86533cbc11a9cf9d9ea.zip
Rename Shader to SceneShader
Diffstat (limited to 'game/vehicles')
-rw-r--r--game/vehicles/railVehicle.cpp2
-rw-r--r--game/vehicles/railVehicle.h4
-rw-r--r--game/vehicles/railVehicleClass.cpp5
-rw-r--r--game/vehicles/railVehicleClass.h4
-rw-r--r--game/vehicles/train.cpp2
-rw-r--r--game/vehicles/train.h4
6 files changed, 11 insertions, 10 deletions
diff --git a/game/vehicles/railVehicle.cpp b/game/vehicles/railVehicle.cpp
index fb42a28..0cf4e72 100644
--- a/game/vehicles/railVehicle.cpp
+++ b/game/vehicles/railVehicle.cpp
@@ -12,7 +12,7 @@
#include <ray.hpp>
void
-RailVehicle::render(const Shader & shader) const
+RailVehicle::render(const SceneShader & shader) const
{
rvClass->render(shader, location, bogies);
}
diff --git a/game/vehicles/railVehicle.h b/game/vehicles/railVehicle.h
index 5fbe1ed..39900cc 100644
--- a/game/vehicles/railVehicle.h
+++ b/game/vehicles/railVehicle.h
@@ -9,7 +9,7 @@
#include <memory>
#include <utility>
-class Shader;
+class SceneShader;
class Ray;
class Train;
@@ -19,7 +19,7 @@ public:
void move(const Train *, float & trailBy);
- void render(const Shader & shader) const override;
+ void render(const SceneShader & shader) const override;
[[nodiscard]] bool intersectRay(const Ray &, glm::vec2 *, float *) const override;
Location location;
diff --git a/game/vehicles/railVehicleClass.cpp b/game/vehicles/railVehicleClass.cpp
index 7eb4495..7d69338 100644
--- a/game/vehicles/railVehicleClass.cpp
+++ b/game/vehicles/railVehicleClass.cpp
@@ -1,5 +1,5 @@
#include "railVehicleClass.h"
-#include "gfx/gl/shader.h"
+#include "gfx/gl/sceneShader.h"
#include "gfx/models/mesh.h"
#include "gfx/models/obj.h"
#include "gfx/models/texture.h"
@@ -39,7 +39,8 @@ RailVehicleClass::RailVehicleClass(std::unique_ptr<ObjParser> o, std::shared_ptr
}
void
-RailVehicleClass::render(const Shader & shader, const Location & location, const std::array<Location, 2> & bl) const
+RailVehicleClass::render(
+ const SceneShader & shader, const Location & location, const std::array<Location, 2> & bl) const
{
texture->bind();
for (auto b = 0U; b < bogies.size(); ++b) {
diff --git a/game/vehicles/railVehicleClass.h b/game/vehicles/railVehicleClass.h
index 604af6a..7249e76 100644
--- a/game/vehicles/railVehicleClass.h
+++ b/game/vehicles/railVehicleClass.h
@@ -5,7 +5,7 @@
#include <memory>
#include <string>
-class Shader;
+class SceneShader;
class Texture;
class ObjParser;
class Location;
@@ -14,7 +14,7 @@ class RailVehicleClass {
public:
explicit RailVehicleClass(const std::string & name);
- void render(const Shader &, const Location &, const std::array<Location, 2> &) const;
+ void render(const SceneShader &, const Location &, const std::array<Location, 2> &) const;
std::array<Mesh::Ptr, 2> bogies;
Mesh::Ptr bodyMesh;
diff --git a/game/vehicles/train.cpp b/game/vehicles/train.cpp
index d1122f8..8fb48f5 100644
--- a/game/vehicles/train.cpp
+++ b/game/vehicles/train.cpp
@@ -12,7 +12,7 @@
class Ray;
void
-Train::render(const Shader & shader) const
+Train::render(const SceneShader & shader) const
{
apply(&Renderable::render, shader);
}
diff --git a/game/vehicles/train.h b/game/vehicles/train.h
index 58e5e29..dfdcf62 100644
--- a/game/vehicles/train.h
+++ b/game/vehicles/train.h
@@ -13,7 +13,7 @@
#include <memory>
#include <vector>
-class Shader;
+class SceneShader;
class Ray;
class Train : public Vehicle, public Collection<RailVehicle, false>, public Can<Go>, public Can<Idle> {
@@ -26,7 +26,7 @@ public:
return objects.front()->location;
}
- void render(const Shader & shader) const override;
+ void render(const SceneShader & shader) const override;
[[nodiscard]] bool intersectRay(const Ray &, glm::vec2 *, float *) const override;