summaryrefslogtreecommitdiff
path: root/src/client/clientmap.h
diff options
context:
space:
mode:
authorhecks <42101236+hecktest@users.noreply.github.com>2020-12-06 00:03:40 +0100
committerGitHub <noreply@github.com>2020-12-05 15:03:40 -0800
commit6d7067fd37a8084aca139ecab552982e0ee99582 (patch)
tree415c1659d452873b575703beed9001c3bc00cf08 /src/client/clientmap.h
parent07e0b527cf3e6e4f1bf36823940216efef59d8c9 (diff)
downloadminetest-6d7067fd37a8084aca139ecab552982e0ee99582.tar.gz
minetest-6d7067fd37a8084aca139ecab552982e0ee99582.tar.bz2
minetest-6d7067fd37a8084aca139ecab552982e0ee99582.zip
Implement mapblock camera offset correctly (#10702)
Implement mapblock camera offset correctly - reduce client jitter Co-authored-by: hecktest <>
Diffstat (limited to 'src/client/clientmap.h')
-rw-r--r--src/client/clientmap.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/client/clientmap.h b/src/client/clientmap.h
index 172e3a1d6..57cc4427e 100644
--- a/src/client/clientmap.h
+++ b/src/client/clientmap.h
@@ -35,6 +35,25 @@ struct MapDrawControl
bool show_wireframe = false;
};
+struct MeshBufList
+{
+ video::SMaterial m;
+ std::vector<std::pair<v3s16,scene::IMeshBuffer*>> bufs;
+};
+
+struct MeshBufListList
+{
+ /*!
+ * Stores the mesh buffers of the world.
+ * The array index is the material's layer.
+ * The vector part groups vertices by material.
+ */
+ std::vector<MeshBufList> lists[MAX_TILE_LAYERS];
+
+ void clear();
+ void add(scene::IMeshBuffer *buf, v3s16 position, u8 layer);
+};
+
class Client;
class ITextureSource;