aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-12-06 15:48:19 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-12-06 15:49:20 +0200
commit8bb36f465000f0fdf5e9202d9f76b170c330c49f (patch)
tree1acba8341d9784ef2d97f430da16ea7019bee0b3
parenta47b82904041584da71e8d8489385a322d3de5cb (diff)
downloadminetest-8bb36f465000f0fdf5e9202d9f76b170c330c49f.tar.gz
minetest-8bb36f465000f0fdf5e9202d9f76b170c330c49f.tar.bz2
minetest-8bb36f465000f0fdf5e9202d9f76b170c330c49f.zip
Fix automagic render distance tuner
-rw-r--r--src/clientmap.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/clientmap.cpp b/src/clientmap.cpp
index 02c9fe9b1..800549a3b 100644
--- a/src/clientmap.cpp
+++ b/src/clientmap.cpp
@@ -352,13 +352,17 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
if(sector_blocks_drawn != 0)
m_last_drawn_sectors[sp] = true;
}
-
+
+ m_control.blocks_would_have_drawn = blocks_would_have_drawn;
+ m_control.blocks_drawn = blocks_drawn;
+
g_profiler->avg("CM: blocks in range", blocks_in_range);
g_profiler->avg("CM: blocks occlusion culled", blocks_occlusion_culled);
if(blocks_in_range != 0)
g_profiler->avg("CM: blocks in range without mesh (frac)",
(float)blocks_in_range_without_mesh/blocks_in_range);
g_profiler->avg("CM: blocks drawn", blocks_drawn);
+ g_profiler->avg("CM: wanted max blocks", m_control.wanted_max_blocks);
}
struct MeshBufList
@@ -467,9 +471,6 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
u32 mesh_animate_count = 0;
u32 mesh_animate_count_far = 0;
- // Blocks that had mesh that would have been drawn according to
- // rendering range (if max blocks limit didn't kick in)
- u32 blocks_would_have_drawn = 0;
// Blocks that were drawn and had a mesh
u32 blocks_drawn = 0;
// Blocks which had a corresponding meshbuffer for this pass
@@ -665,9 +666,6 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
g_profiler->avg(prefix+"empty blocks (frac)",
(float)blocks_without_stuff / blocks_drawn);
- m_control.blocks_drawn = blocks_drawn;
- m_control.blocks_would_have_drawn = blocks_would_have_drawn;
-
/*infostream<<"renderMap(): is_transparent_pass="<<is_transparent_pass
<<", rendered "<<vertex_count<<" vertices."<<std::endl;*/
}