From 6d9d393ae60bfc6b2625a5540cd60ffed478aa13 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 12 Mar 2026 01:15:26 +0000 Subject: Shared VAO for all 3 parts of RailVehicleClass Rearranges its LocationVertex to be 3 repeated Parts. Adds helpers to glvglVertexArray for useBuffer with various offsets. Render is then an iteration of the meshes and the location data at the nth offset. --- game/vehicles/railVehicle.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'game/vehicles/railVehicle.cpp') diff --git a/game/vehicles/railVehicle.cpp b/game/vehicles/railVehicle.cpp index 4a0a22d..61f6c93 100644 --- a/game/vehicles/railVehicle.cpp +++ b/game/vehicles/railVehicle.cpp @@ -14,18 +14,18 @@ RailVehicle::RailVehicle(RailVehicleClassPtr rvc) : RailVehicleClass::Instance {rvc->instances.acquire()}, rvClass {std::move(rvc)}, location {[this](const BufferedLocation * l) { - this->get()->body = l->getRotationTransform(); - this->get()->bodyPos = l->position(); + this->get()->body.rotation = l->getRotationTransform(); + this->get()->body.position = l->position(); }}, bogies {{ {[this](const BufferedLocation * l) { - this->get()->front = l->getRotationTransform(); - this->get()->frontPos = l->position(); + this->get()->front.rotation = l->getRotationTransform(); + this->get()->front.position = l->position(); }, GlobalPosition3D {0, rvClass->wheelBase / 2.F, 0}}, {[this](const BufferedLocation * l) { - this->get()->back = l->getRotationTransform(); - this->get()->backPos = l->position(); + this->get()->back.rotation = l->getRotationTransform(); + this->get()->back.position = l->position(); }, GlobalPosition3D {0, -rvClass->wheelBase / 2.F, 0}}, }} -- cgit v1.3