chunkmgr: debug info for chunkmgr

main
EmaMaker 2023-10-04 14:59:17 +02:00
parent 1b4cef8958
commit 357f67aac1
2 changed files with 13 additions and 4 deletions

View File

@ -247,6 +247,11 @@ namespace chunkmanager
}
});
debug::window::set_parameter("update_chunks_total", (int)chunks.size());
debug::window::set_parameter("update_chunks_generated", (int) nGenerated);
debug::window::set_parameter("update_chunks_meshed", (int) nMeshed);
debug::window::set_parameter("update_chunks_freed", (int) nUnloaded);
debug::window::set_parameter("update_chunks_explored", (int) nExplored);
}
}

View File

@ -112,10 +112,14 @@ namespace debug{
if(ImGui::CollapsingHeader("Chunks")){
ImGui::Text("Total chunks present: %d",
std::any_cast<int>(parameters.at("update_chunks_total")));
/*ImGui::Text("Chunks freed from memory: %d",
std::any_cast<int>(parameters.at("update_chunks_delete")));*/
ImGui::Text("Bucket size: %d",
std::any_cast<int>(parameters.at("update_chunks_bucket")));
ImGui::Text("Chunks generated: %d",
std::any_cast<int>(parameters.at("update_chunks_generated")));
ImGui::Text("Chunks meshed: %d",
std::any_cast<int>(parameters.at("update_chunks_meshed")));
ImGui::Text("Chunks actually freed from memory: %d",
std::any_cast<int>(parameters.at("update_chunks_freed")));
ImGui::Text("Chunks explored: %d",
std::any_cast<int>(parameters.at("update_chunks_explored")));
}
}catch(const std::bad_any_cast& e){
std::cout << e.what() << std::endl;