summaryrefslogtreecommitdiff
path: root/game/water.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-03-11 20:45:05 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2026-03-11 20:45:05 +0000
commitc403a71564def731f4d3b80d6ff63f08aa3c7ea3 (patch)
treee4302316295639da9a2d10181c498986c8806754 /game/water.cpp
parentAdd missing typename exporting base::value_type from InstanceVertices (diff)
downloadilt-c403a71564def731f4d3b80d6ff63f08aa3c7ea3.tar.bz2
ilt-c403a71564def731f4d3b80d6ff63f08aa3c7ea3.tar.xz
ilt-c403a71564def731f4d3b80d6ff63f08aa3c7ea3.zip
Reuse vertex array objects for common structures with DSA
Slashes the number of VAOs required and the amount of setup required.
Diffstat (limited to 'game/water.cpp')
-rw-r--r--game/water.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/game/water.cpp b/game/water.cpp
index a3c1452..96f35cf 100644
--- a/game/water.cpp
+++ b/game/water.cpp
@@ -1,5 +1,6 @@
#include "water.h"
#include "game/geoData.h"
+#include "gfx/gl/gldebug.h"
#include "gfx/models/texture.h"
#include <algorithm>
#include <cstddef>
@@ -42,6 +43,7 @@ static constexpr GlobalDistance BORDER = TILE_SIZE / 2;
void
Water::generateMeshes()
{
+ glDebugScope _ {0};
// Map out where a water square needs to exist to cover all terrain faces with a low vertex
std::set<GlobalPosition2D> waterPositions;
std::for_each(geoData->vertices_sbegin(), geoData->vertices_end(), [this, &waterPositions](const auto vh) {