From 3779d090f0bde96edca5b700fdfdf12a584992fa Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 26 Feb 2025 19:36:06 +0000 Subject: Split meshes by surface and tile Tile is derived per face based on the first vertices point rounded to roughly 1km. --- game/terrain.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'game/terrain.h') diff --git a/game/terrain.h b/game/terrain.h index 095b4ef..f5b1b32 100644 --- a/game/terrain.h +++ b/game/terrain.h @@ -37,7 +37,13 @@ private: GLsizei count; }; + struct SurfaceKey { + const Surface * surface; + GlobalPosition2D basePosition; + bool operator<(const SurfaceKey &) const; + }; + glBuffer verticesBuffer; - std::multimap meshes; + std::map meshes; Texture::Ptr grass = std::make_shared("grass.png"); }; -- cgit v1.2.3