summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game/network/rail.cpp2
-rw-r--r--game/network/rail.h4
-rw-r--r--game/vehicles/railVehicleClass.h4
-rw-r--r--gfx/models/mesh.h4
4 files changed, 7 insertions, 7 deletions
diff --git a/game/network/rail.cpp b/game/network/rail.cpp
index 5fec7c1..635ee6e 100644
--- a/game/network/rail.cpp
+++ b/game/network/rail.cpp
@@ -92,7 +92,7 @@ RailLinks::addLinksBetween(glm::vec3 start, glm::vec3 end)
return addLink<RailLinkCurve>(start, end, centre.first);
}
-MeshPtr
+Mesh::Ptr
RailLink::defaultMesh(const std::span<Vertex> vertices)
{
std::vector<unsigned int> indices;
diff --git a/game/network/rail.h b/game/network/rail.h
index 78d4a86..b1a036e 100644
--- a/game/network/rail.h
+++ b/game/network/rail.h
@@ -30,9 +30,9 @@ public:
protected:
[[nodiscard]] glm::vec3 vehiclePositionOffset() const override;
- [[nodiscard]] static MeshPtr defaultMesh(const std::span<Vertex> vertices);
+ [[nodiscard]] static Mesh::Ptr defaultMesh(const std::span<Vertex> vertices);
- MeshPtr mesh;
+ Mesh::Ptr mesh;
};
RailLink::~RailLink() = default;
diff --git a/game/vehicles/railVehicleClass.h b/game/vehicles/railVehicleClass.h
index 8f82fd2..604af6a 100644
--- a/game/vehicles/railVehicleClass.h
+++ b/game/vehicles/railVehicleClass.h
@@ -16,8 +16,8 @@ public:
void render(const Shader &, const Location &, const std::array<Location, 2> &) const;
- std::array<MeshPtr, 2> bogies;
- MeshPtr bodyMesh;
+ std::array<Mesh::Ptr, 2> bogies;
+ Mesh::Ptr bodyMesh;
std::shared_ptr<Texture> texture;
float wheelBase;
float length;
diff --git a/gfx/models/mesh.h b/gfx/models/mesh.h
index c6f11a2..25a9064 100644
--- a/gfx/models/mesh.h
+++ b/gfx/models/mesh.h
@@ -4,10 +4,11 @@
#include <glArrays.h>
#include <memory>
#include <span>
+#include <stdTypeDefs.hpp>
class Vertex;
-class Mesh {
+class Mesh : public ConstTypeDefs<Mesh> {
public:
Mesh(const std::span<const Vertex> vertices, const std::span<const unsigned int> indices, GLenum = GL_TRIANGLES);
@@ -19,4 +20,3 @@ private:
GLsizei m_numIndices;
GLenum mode;
};
-using MeshPtr = std::shared_ptr<const Mesh>;