From 11c122eb1cc86ca1a40c84eb411ccd97791dc47d Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 23 Jul 2008 22:25:12 +0000 Subject: report vertex array size in func_list_model --- src/model/model.cc | 4 ++-- src/model/vertexarray.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/model/model.cc b/src/model/model.cc index 5becc82..979b79a 100644 --- a/src/model/model.cc +++ b/src/model/model.cc @@ -106,7 +106,7 @@ void Model::clear() void Model::list_model(Model *model) { - con_print << " " << model->name() << " " << + con_print << " " << model->name() << " " << model->model_tris_count << "/" << model->model_tris_detail_count << " tris/detail " << model->model_quad_count << "/" << model->model_quad_detail_count << " quads/detail " << model->fragments().size() << " frags "<< std::endl; @@ -122,7 +122,7 @@ void Model::list() con_print << model_registry.size() << " registered models" << std::endl; if (VertexArray::instance()) con_print << "vertex array " << (VertexArray::instance()->index() * 100 / VertexArray::instance()->size()) - << "% of " << VertexArray::instance()->size() << " used" << std::endl; + << "% of " << VertexArray::instance()->size() * 4 *sizeof(float) / (1024*1024) << "Mb used" << std::endl; } } diff --git a/src/model/vertexarray.h b/src/model/vertexarray.h index 37f2be9..8312789 100644 --- a/src/model/vertexarray.h +++ b/src/model/vertexarray.h @@ -51,13 +51,13 @@ public: return vertex_overflow; } - /// number of allocated floats + /// size of the vertex array in number of floats (for a single array) inline size_t size() const { return vertex_size; } - /// index to the top of the stack + /// number of allocated floats inline size_t index() const { return vertex_index; -- cgit v1.2.3