From a6e28fe377b41500d6ce3e0a9a4d6e6288d97f61 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 17 Jan 2024 01:08:54 +0000 Subject: Copy render vital link data to vertex buffer --- game/network/rail.h | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'game/network/rail.h') diff --git a/game/network/rail.h b/game/network/rail.h index 986b0aa..e06568f 100644 --- a/game/network/rail.h +++ b/game/network/rail.h @@ -40,23 +40,39 @@ protected: RailLink::~RailLink() = default; +class RailLinks; + class RailLinkStraight : public RailLink, public LinkStraight { public: - RailLinkStraight(const Node::Ptr &, const Node::Ptr &); + RailLinkStraight(NetworkLinkHolder &, const Node::Ptr &, const Node::Ptr &); + + struct Vertex { + GlobalPosition3D a, b; + glm::mat2 rotation; + float textureRepeats; + }; private: - RailLinkStraight(Node::Ptr, Node::Ptr, const RelativePosition3D & diff); + RailLinkStraight(NetworkLinkHolder &, Node::Ptr, Node::Ptr, const RelativePosition3D & diff); + InstanceVertices::InstanceProxy instance; }; class RailLinkCurve : public RailLink, public LinkCurve { public: - RailLinkCurve(const Node::Ptr &, const Node::Ptr &, GlobalPosition2D); + RailLinkCurve(NetworkLinkHolder &, const Node::Ptr &, const Node::Ptr &, GlobalPosition2D); + + struct Vertex { + GlobalPosition3D a, b, c; + float textureRepeats; + }; private: - RailLinkCurve(const Node::Ptr &, const Node::Ptr &, GlobalPosition3D, const Arc); + RailLinkCurve( + NetworkLinkHolder &, const Node::Ptr &, const Node::Ptr &, GlobalPosition3D, const Arc); + InstanceVertices::InstanceProxy instance; }; -class RailLinks : public NetworkOf, public WorldObject { +class RailLinks : public NetworkOf, public WorldObject { public: RailLinks(); -- cgit v1.2.3