summaryrefslogtreecommitdiff
path: root/game/network/rail.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-03-07 12:32:55 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2026-03-07 14:17:44 +0000
commit4420f20a901ed1f96d9fb8f4df0148bc0bc3666d (patch)
treeb6484d3a75acb1c9461707d2c7168fa5b652b15c /game/network/rail.cpp
parentDon't create and then replace shadow and billboard textures (diff)
downloadilt-4420f20a901ed1f96d9fb8f4df0148bc0bc3666d.tar.bz2
ilt-4420f20a901ed1f96d9fb8f4df0148bc0bc3666d.tar.xz
ilt-4420f20a901ed1f96d9fb8f4df0148bc0bc3666d.zip
Add glVertexArray useBuffer
Wraps glVertexArrayVertexBuffer automatically getting the buffer name from the argument and deriving the stride from the container's value_type.
Diffstat (limited to 'game/network/rail.cpp')
-rw-r--r--game/network/rail.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/game/network/rail.cpp b/game/network/rail.cpp
index 545620d..d0a8bdd 100644
--- a/game/network/rail.cpp
+++ b/game/network/rail.cpp
@@ -159,8 +159,7 @@ namespace {
if (auto count = networkLinks.vertices.size()) {
shader.use(RAIL_CROSS_SECTION, RAIL_TEXTURE_POS);
glBindVertexArray(networkLinks.vao);
- glVertexArrayVertexBuffer(
- networkLinks.vao, 0, networkLinks.vertices.bufferName(), 0, sizeof(typename LinkType::Vertex));
+ networkLinks.vao.useBuffer(0, networkLinks.vertices);
glDrawArrays(mode, 0, static_cast<GLsizei>(count));
}
};