summaryrefslogtreecommitdiff
path: root/game/vehicles/railVehicleClass.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-05-06 16:42:08 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-05-06 16:42:08 +0100
commit72ab29786f6d4c97a92cb95c75091537490e2d0f (patch)
tree18bf013e3be660b0769cd1a601e670eb79355324 /game/vehicles/railVehicleClass.h
parentRefactor InstanceVertices in terms of glContainer (diff)
downloadilt-72ab29786f6d4c97a92cb95c75091537490e2d0f.tar.bz2
ilt-72ab29786f6d4c97a92cb95c75091537490e2d0f.tar.xz
ilt-72ab29786f6d4c97a92cb95c75091537490e2d0f.zip
Templated BufferedLocation and single buffer storage for RVC locations
Diffstat (limited to 'game/vehicles/railVehicleClass.h')
-rw-r--r--game/vehicles/railVehicleClass.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/game/vehicles/railVehicleClass.h b/game/vehicles/railVehicleClass.h
index 2fda8f7..80b3fda 100644
--- a/game/vehicles/railVehicleClass.h
+++ b/game/vehicles/railVehicleClass.h
@@ -18,6 +18,10 @@ public:
void render(const SceneShader & shader) const override;
void shadows(const ShadowMapper & shadowMapper) const override;
+ struct LocationVertex {
+ glm::mat4 body, front, back;
+ };
+
std::array<Mesh::Ptr, 2> bogies;
Mesh::Ptr bodyMesh;
std::shared_ptr<Texture> texture;
@@ -25,8 +29,8 @@ public:
float length;
float maxSpeed;
- mutable InstanceVertices<glm::mat4> instancesBody;
- mutable std::array<InstanceVertices<glm::mat4>, 2> instancesBogies;
+ mutable InstanceVertices<LocationVertex> instances;
+ using Instance = decltype(instances)::InstanceProxy;
protected:
friend Persistence::SelectionPtrBase<std::shared_ptr<RailVehicleClass>>;