diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-11-13 00:17:11 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-11-13 00:17:11 +0000 |
commit | 356e874050e5ad5af87b04a2bb01ce34a86640bb (patch) | |
tree | c3f2a5d548340821378f6d79b03c81bd63382282 /game/vehicles/railVehicleClass.cpp | |
parent | Refactor BufferedLocationT to use a callback (diff) | |
download | ilt-356e874050e5ad5af87b04a2bb01ce34a86640bb.tar.bz2 ilt-356e874050e5ad5af87b04a2bb01ce34a86640bb.tar.xz ilt-356e874050e5ad5af87b04a2bb01ce34a86640bb.zip |
Send position and rotation matrix to GPU separately
Diffstat (limited to 'game/vehicles/railVehicleClass.cpp')
-rw-r--r-- | game/vehicles/railVehicleClass.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/game/vehicles/railVehicleClass.cpp b/game/vehicles/railVehicleClass.cpp index 324148c..7a6a9fe 100644 --- a/game/vehicles/railVehicleClass.cpp +++ b/game/vehicles/railVehicleClass.cpp @@ -35,13 +35,15 @@ void RailVehicleClass::postLoad() { texture = getTexture(); - bodyMesh->configureVAO(instanceVAO).addAttribs<LocationVertex, &LocationVertex::body>(instances.bufferName(), 1); + bodyMesh->configureVAO(instanceVAO) + .addAttribs<LocationVertex, &LocationVertex::body, &LocationVertex::bodyPos>(instances.bufferName(), 1); bogies.front() ->configureVAO(instancesBogiesVAO.front()) - .addAttribs<LocationVertex, &LocationVertex::front>(instances.bufferName(), 1); + .addAttribs<LocationVertex, &LocationVertex::front, &LocationVertex::frontPos>(instances.bufferName(), 1); bogies.back() ->configureVAO(instancesBogiesVAO.back()) - .addAttribs<LocationVertex, &LocationVertex::back>(instances.bufferName(), 1); + .addAttribs<LocationVertex, &LocationVertex::back, &LocationVertex::backPos>(instances.bufferName(), 1); + static_assert(sizeof(LocationVertex) == 228UL); } void |