diff options
Diffstat (limited to 'game/vehicles')
-rw-r--r-- | game/vehicles/railVehicle.cpp | 2 | ||||
-rw-r--r-- | game/vehicles/railVehicle.h | 4 | ||||
-rw-r--r-- | game/vehicles/railVehicleClass.cpp | 5 | ||||
-rw-r--r-- | game/vehicles/railVehicleClass.h | 4 | ||||
-rw-r--r-- | game/vehicles/train.cpp | 2 | ||||
-rw-r--r-- | game/vehicles/train.h | 4 |
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; |