aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-04-07 20:22:06 +0200
committerkwolekr <kwolekr@minetest.net>2013-04-07 23:38:22 -0400
commit10502b59bce198f8ccbdb6e3d154b25873b9406d (patch)
tree157632d3c8f058b3851e008feea59dc3d00ce76c
parentabe74ea5ea820403450725ee0ddcc44b07cbe098 (diff)
downloadminetest-10502b59bce198f8ccbdb6e3d154b25873b9406d.tar.gz
minetest-10502b59bce198f8ccbdb6e3d154b25873b9406d.tar.bz2
minetest-10502b59bce198f8ccbdb6e3d154b25873b9406d.zip
addon extended resource accounting
-rw-r--r--src/game.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 4f6eb472d..aae88fe90 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <IGUIStaticText.h>
#include <IGUIFont.h>
#include <IMaterialRendererServices.h>
+#include "IMeshCache.h"
#include "client.h"
#include "server.h"
#include "guiPauseMenu.h"
@@ -3314,6 +3315,21 @@ void the_game(
delete shsrc;
delete nodedef;
delete itemdef;
+
+ //extended resource accounting
+ infostream << "Irrlicht resources after cleanup:" << std::endl;
+ infostream << "\tRemaining meshes : "
+ << device->getSceneManager()->getMeshCache()->getMeshCount() << std::endl;
+ infostream << "\tRemaining textures : "
+ << driver->getTextureCount() << std::endl;
+ for (unsigned int i = 0; i < driver->getTextureCount(); i++ ) {
+ irr::video::ITexture* texture = driver->getTextureByIndex(i);
+ infostream << "\t\t" << i << ":" << texture->getName().getPath().c_str()
+ << std::endl;
+ }
+ infostream << "\tRemaining materials: "
+ << driver-> getMaterialRendererCount ()
+ << " (note: irrlicht doesn't support removing renderers)"<< std::endl;
}