From 55e41471e7d4bac221aa82ca9504df7bec43e666 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 10 Mar 2021 01:05:35 +0000 Subject: Vertices and indices vectors not required once mesh is created --- game/network/rail.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'game/network/rail.h') diff --git a/game/network/rail.h b/game/network/rail.h index 1d0ef68..c67dc67 100644 --- a/game/network/rail.h +++ b/game/network/rail.h @@ -1,10 +1,8 @@ #ifndef RAILLINKS_H #define RAILLINKS_H -#include "collection.hpp" #include "game/worldobject.h" #include "gfx/models/mesh.h" -#include "gfx/models/vertex.hpp" #include "gfx/renderable.h" #include "link.h" #include "network.h" @@ -13,10 +11,11 @@ #include #include #include +#include #include -#include class Shader; +class Vertex; // A piece of rail track class RailLink : public Link, public Renderable { @@ -26,11 +25,9 @@ public: void render(const Shader &) const override; protected: - void defaultMesh(); + [[nodiscard]] static MeshPtr defaultMesh(const std::span vertices); - Collection meshes; - std::vector vertices; - std::vector indices; + MeshPtr mesh; }; class RailLinkStraight : public RailLink { -- cgit v1.2.3