mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
Display more information for list_contents.
This commit is contained in:
parent
af8a72f828
commit
82ee360915
@ -787,26 +787,32 @@ void TexturePool::
|
|||||||
ns_list_contents(ostream &out) const {
|
ns_list_contents(ostream &out) const {
|
||||||
MutexHolder holder(_lock);
|
MutexHolder holder(_lock);
|
||||||
|
|
||||||
|
int total_size;
|
||||||
|
int total_ram_size;
|
||||||
|
Textures::const_iterator ti;
|
||||||
|
|
||||||
out << "texture pool contents:\n";
|
out << "texture pool contents:\n";
|
||||||
|
|
||||||
int total_size;
|
|
||||||
|
|
||||||
total_size = 0;
|
total_size = 0;
|
||||||
Textures::const_iterator ti;
|
total_ram_size = 0;
|
||||||
for (ti = _textures.begin(); ti != _textures.end(); ++ti) {
|
for (ti = _textures.begin(); ti != _textures.end(); ++ti) {
|
||||||
Texture *tex = (*ti).second;
|
Texture *tex = (*ti).second;
|
||||||
out << (*ti).first << "\n";
|
out << (*ti).first << "\n";
|
||||||
out << " (count = " << tex->get_ref_count()
|
out << " (count = " << tex->get_ref_count()
|
||||||
<< ", ram = " << tex->get_ram_image_size()
|
<< ", ram = " << tex->get_ram_image_size()
|
||||||
|
<< ", size = " << tex->get_ram_page_size()
|
||||||
<< ", w = " << tex->get_x_size()
|
<< ", w = " << tex->get_x_size()
|
||||||
<< ", h = " << tex->get_y_size()
|
<< ", h = " << tex->get_y_size()
|
||||||
<< ")\n";
|
<< ")\n";
|
||||||
nassertv(tex->_texture_pool_key == (*ti).first);
|
nassertv(tex->_texture_pool_key == (*ti).first);
|
||||||
total_size += tex->get_ram_image_size();
|
total_ram_size += tex->get_ram_image_size();
|
||||||
|
total_size += tex->get_ram_page_size();
|
||||||
}
|
}
|
||||||
|
|
||||||
out << "total number of textures: " << _textures.size() << "\n";
|
out << "total number of textures: " << _textures.size() << "\n";
|
||||||
|
out << "texture pool ram : " << total_ram_size << "\n";
|
||||||
out << "texture pool size: " << total_size << "\n";
|
out << "texture pool size: " << total_size << "\n";
|
||||||
|
out << "texture pool size - texture pool ram: " << total_size - total_ram_size << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user