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 --- game/vehicles/railVehicle.cpp | 2 +- game/vehicles/railVehicle.h | 4 ++-- game/vehicles/railVehicleClass.cpp | 5 +++-- game/vehicles/railVehicleClass.h | 4 ++-- game/vehicles/train.cpp | 2 +- game/vehicles/train.h | 4 ++-- 6 files changed, 11 insertions(+), 10 deletions(-) (limited to 'game/vehicles') 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 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 #include -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 o, std::shared_ptr } void -RailVehicleClass::render(const Shader & shader, const Location & location, const std::array & bl) const +RailVehicleClass::render( + const SceneShader & shader, const Location & location, const std::array & 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 #include -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 &) const; + void render(const SceneShader &, const Location &, const std::array &) const; std::array 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 #include -class Shader; +class SceneShader; class Ray; class Train : public Vehicle, public Collection, public Can, public Can { @@ -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; -- cgit v1.2.3