summaryrefslogtreecommitdiff
path: root/game/vehicles
diff options
context:
space:
mode:
authorDan Goodliffe <dan.goodliffe@octal.co.uk>2026-03-06 14:22:28 +0000
committerDan Goodliffe <dan.goodliffe@octal.co.uk>2026-03-06 14:22:28 +0000
commitcf0ecc35ed114c6bf54fce9c6228d60dbba1a3b5 (patch)
tree7ad39a785511e5137859dbef6c940124182b8447 /game/vehicles
parentExtend glVertexArray with VertexArrayConfigurator (diff)
downloadilt-cf0ecc35ed114c6bf54fce9c6228d60dbba1a3b5.tar.bz2
ilt-cf0ecc35ed114c6bf54fce9c6228d60dbba1a3b5.tar.xz
ilt-cf0ecc35ed114c6bf54fce9c6228d60dbba1a3b5.zip
Replace use of VertexArrayObject with glVertexArray/glBuffer DSA versions
Diffstat (limited to 'game/vehicles')
-rw-r--r--game/vehicles/railVehicleClass.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/game/vehicles/railVehicleClass.cpp b/game/vehicles/railVehicleClass.cpp
index 21f01c8..a11b435 100644
--- a/game/vehicles/railVehicleClass.cpp
+++ b/game/vehicles/railVehicleClass.cpp
@@ -1,7 +1,6 @@
#include "railVehicleClass.h"
#include "gfx/gl/sceneShader.h"
#include "gfx/gl/shadowMapper.h"
-#include "gfx/gl/vertexArrayObject.h"
#include <array>
#include <glm/glm.hpp>
#include <lib/resource.h>
@@ -34,14 +33,14 @@ void
RailVehicleClass::postLoad()
{
texture = getTexture();
- bodyMesh->configureVAO(instanceVAO)
- .addAttribs<LocationVertex, &LocationVertex::body, &LocationVertex::bodyPos>(instances.bufferName(), 1);
+ bodyMesh->configureVAO(instanceVAO, 0)
+ .addAttribs<LocationVertex, &LocationVertex::body, &LocationVertex::bodyPos>(1, instances.bufferName());
bogies.front()
- ->configureVAO(instancesBogiesVAO.front())
- .addAttribs<LocationVertex, &LocationVertex::front, &LocationVertex::frontPos>(instances.bufferName(), 1);
+ ->configureVAO(instancesBogiesVAO.front(), 0)
+ .addAttribs<LocationVertex, &LocationVertex::front, &LocationVertex::frontPos>(1, instances.bufferName());
bogies.back()
- ->configureVAO(instancesBogiesVAO.back())
- .addAttribs<LocationVertex, &LocationVertex::back, &LocationVertex::backPos>(instances.bufferName(), 1);
+ ->configureVAO(instancesBogiesVAO.back(), 0)
+ .addAttribs<LocationVertex, &LocationVertex::back, &LocationVertex::backPos>(1, instances.bufferName());
static_assert(sizeof(LocationVertex) == 144UL);
}