From: Perttu Ahola Date: Thu, 6 Dec 2012 13:48:19 +0000 (+0200) Subject: Fix automagic render distance tuner X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=8bb36f465000f0fdf5e9202d9f76b170c330c49f;p=zefram%2Fminetest%2Fminetest_engine.git Fix automagic render distance tuner --- diff --git a/src/clientmap.cpp b/src/clientmap.cpp index 02c9fe9b..800549a3 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="<