Fix an indirect movie texture crash (reset PixelStore)

Simplify texture handling: m_ID is const (can't be changed after
load at all); preference overrides are handled in RageTexture;
reloads no longer need a parameter
This commit is contained in:
Glenn Maynard
2003-01-26 00:56:13 +00:00
parent 71a23141da
commit 22272aecb0
7 changed files with 33 additions and 30 deletions
+1 -20
View File
@@ -88,8 +88,6 @@ RageTexture* RageTextureManager::LoadTexture( RageTextureID ID )
}
// the texture is not already loaded. Load it.
ID.iColorDepth = TEXTUREMAN->GetTextureColorDepth();
ID.iMaxSize = TEXTUREMAN->GetMaxTextureResolution();
CString sDir, sFName, sExt;
splitpath( ID.filename, sDir, sFName, sExt );
@@ -200,24 +198,7 @@ void RageTextureManager::ReloadAll()
for( std::map<RageTextureID, RageTexture*>::iterator i = m_mapPathToTexture.begin();
i != m_mapPathToTexture.end(); ++i)
{
RageTexture* pTexture = i->second;
/* A note on how this really works:
*
* The ID identifies a texture, and all of the parameters needed
* to produce it. When we load a texture, iColorDepth is pulled
* from GetTextureColorDepth(). Now we're reloading it, probably
* due to a change in display settings, so we need to update that
* to the current setting and reload it. This will also change
* the data in our map (which is OK; it's not part of the ordering)
* to reflect this. */
/* Update the settings that are based on preferences. */
RageTextureID ID = i->first;
ID.iColorDepth = TEXTUREMAN->GetTextureColorDepth();
ID.iMaxSize = TEXTUREMAN->GetMaxTextureResolution();
pTexture->Reload( ID );
i->second->Reload();
}
}