aboutsummaryrefslogtreecommitdiff
path: root/src/clientmap.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-09-04 09:48:26 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-09-04 22:41:03 +0300
commitee2d9d973a0397ce244f05d49083250956578780 (patch)
treed3626b0eb5f995ede95f929f721d9cd52a7c5072 /src/clientmap.h
parent0e6f7a21c60d162b3b7134882dc22dbd8acd014f (diff)
downloadminetest-ee2d9d973a0397ce244f05d49083250956578780.tar.gz
minetest-ee2d9d973a0397ce244f05d49083250956578780.tar.bz2
minetest-ee2d9d973a0397ce244f05d49083250956578780.zip
Reorganize ClientMap rendering code for a bit more performance
- Don't select blocks for drawing in every frame - Sort meshbuffers by material before drawing
Diffstat (limited to 'src/clientmap.h')
-rw-r--r--src/clientmap.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/clientmap.h b/src/clientmap.h
index 29ebed159..f8a69630e 100644
--- a/src/clientmap.h
+++ b/src/clientmap.h
@@ -113,7 +113,8 @@ public:
{
return m_box;
}
-
+
+ void updateDrawList(video::IVideoDriver* driver);
void renderMap(video::IVideoDriver* driver, s32 pass);
int getBackgroundBrightness(float max_d, u32 daylight_factor,
@@ -141,6 +142,8 @@ private:
v3f m_camera_direction;
f32 m_camera_fov;
JMutex m_camera_mutex;
+
+ core::map<v3s16, MapBlock*> m_drawlist;
core::map<v2s16, bool> m_last_drawn_sectors;
};