summaryrefslogtreecommitdiff
path: root/game/vehicles/railVehicleClass.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-05-07 01:41:31 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-05-07 01:41:31 +0100
commit9ab2aad4aa00afe3373b3a779377fa049459fb4d (patch)
tree18bf013e3be660b0769cd1a601e670eb79355324 /game/vehicles/railVehicleClass.h
parentRename strings.h to something that won't conflict with a system header (diff)
parentTemplated BufferedLocation and single buffer storage for RVC locations (diff)
downloadilt-9ab2aad4aa00afe3373b3a779377fa049459fb4d.tar.bz2
ilt-9ab2aad4aa00afe3373b3a779377fa049459fb4d.tar.xz
ilt-9ab2aad4aa00afe3373b3a779377fa049459fb4d.zip
Merge branch 'containers'
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>>;