aboutsummaryrefslogtreecommitdiff
path: root/src/mapblock_mesh.h
diff options
context:
space:
mode:
authorNovatux <nathanael.courant@laposte.net>2014-01-26 11:40:21 +0100
committerNovatux <nathanael.courant@laposte.net>2014-03-04 20:12:10 +0100
commit062de11b4cff30861dd4e9eb56f131d821f34b51 (patch)
tree37bdcbacb355abfe1f8091307222e430e58b78d8 /src/mapblock_mesh.h
parent8e15179e7d896851c6f5814fc6524c86b26ce2e3 (diff)
downloadminetest-062de11b4cff30861dd4e9eb56f131d821f34b51.tar.gz
minetest-062de11b4cff30861dd4e9eb56f131d821f34b51.tar.bz2
minetest-062de11b4cff30861dd4e9eb56f131d821f34b51.zip
Fix rendering glitches when far from the center of the map
Diffstat (limited to 'src/mapblock_mesh.h')
-rw-r--r--src/mapblock_mesh.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mapblock_mesh.h b/src/mapblock_mesh.h
index c75984021..021309d99 100644
--- a/src/mapblock_mesh.h
+++ b/src/mapblock_mesh.h
@@ -81,7 +81,7 @@ class MapBlockMesh
{
public:
// Builds the mesh given
- MapBlockMesh(MeshMakeData *data);
+ MapBlockMesh(MeshMakeData *data, v3s16 camera_offset);
~MapBlockMesh();
// Main animation function, parameters:
@@ -107,6 +107,8 @@ public:
if(m_animation_force_timer > 0)
m_animation_force_timer--;
}
+
+ void updateCameraOffset(v3s16 camera_offset);
private:
scene::SMesh *m_mesh;
@@ -133,6 +135,9 @@ private:
u32 m_last_daynight_ratio;
// For each meshbuffer, maps vertex indices to (day,night) pairs
std::map<u32, std::map<u32, std::pair<u8, u8> > > m_daynight_diffs;
+
+ // Camera offset info -> do we have to translate the mesh?
+ v3s16 m_camera_offset;
};