output texture info

This commit is contained in:
Glenn Maynard
2003-04-24 19:51:27 +00:00
parent 60de1a24a1
commit e009925ca3
3 changed files with 21 additions and 0 deletions
+18
View File
@@ -223,3 +223,21 @@ bool RageTextureManager::SetPrefs( int iTextureColorDepth, bool bDelayedDelete,
ASSERT( m_iTextureColorDepth==16 || m_iTextureColorDepth==32 );
return need_reload;
}
void RageTextureManager::DiagnosticOutput() const
{
unsigned cnt = distance(m_mapPathToTexture.begin(), m_mapPathToTexture.end());
LOG->Trace("%u textures loaded:", cnt);
for( std::map<RageTextureID, RageTexture*>::const_iterator i = m_mapPathToTexture.begin();
i != m_mapPathToTexture.end(); ++i )
{
const RageTextureID &ID = i->first;
const RageTexture *tex = i->second;
/* This could output much more, but I only need resolution now and I don't
* want it to be more than one line. */
LOG->Trace(" %3ix%3i (%2i) %s",
tex->GetTextureHeight(), tex->GetTextureWidth(),
tex->m_iRefCount, Basename(ID.filename).c_str() );
}
}
+2
View File
@@ -43,6 +43,8 @@ public:
void InvalidateTextures();
void RageTextureManager::DiagnosticOutput() const;
protected:
void DeleteTexture( RageTexture *t );
enum GCType { cached_textures, delayed_delete };
+1
View File
@@ -299,6 +299,7 @@ void ScreenManager::EmptyDeleteQueue()
/* Now that we've actually deleted a screen, it makes sense to clear out
* cached textures. */
TEXTUREMAN->DeleteCachedTextures();
TEXTUREMAN->DiagnosticOutput();
}
/* XXX: Big hack: