diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-10 09:40:37 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-10 10:23:51 +0000 |
| commit | b73a3c677171a13bdd7b0044071601647bfbfe67 (patch) | |
| tree | 31f3ff8371ee964dfb6e68226d8f7f835c46293a /game/terrain.cpp | |
| parent | Switch frame and render buffer to DSA helpers (diff) | |
| download | ilt-b73a3c677171a13bdd7b0044071601647bfbfe67.tar.bz2 ilt-b73a3c677171a13bdd7b0044071601647bfbfe67.tar.xz ilt-b73a3c677171a13bdd7b0044071601647bfbfe67.zip | |
Diffstat (limited to 'game/terrain.cpp')
| -rw-r--r-- | game/terrain.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/game/terrain.cpp b/game/terrain.cpp index 8bef36e..44ed484 100644 --- a/game/terrain.cpp +++ b/game/terrain.cpp @@ -6,7 +6,7 @@ #include <gfx/image.h> #include <gfx/models/mesh.h> #include <gfx/models/vertex.h> -#include <glMappedBufferWriter.h> +#include <glMappedBufferSpan.h> #include <glm/glm.hpp> #include <location.h> #include <maths.h> @@ -33,7 +33,8 @@ Terrain::SurfaceKey::operator<(const SurfaceKey & other) const inline void Terrain::copyVerticesToBuffer() const { - std::ranges::transform(all_vertices(), glMappedBufferWriter<Vertex> {GL_ARRAY_BUFFER, verticesBuffer, n_vertices()}, + std::ranges::transform(all_vertices(), + glMappedBufferSpan<Vertex> {verticesBuffer, n_vertices(), GL_WRITE_ONLY, true}.begin(), [this](const auto & vertex) { return Vertex {point(vertex), normal(vertex)}; }); |
