mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-12 23:54:33 +00:00
- do not precache unreferenced textures
https://forum.zdoom.org/viewtopic.php?t=72649
This commit is contained in:
parent
e453f97872
commit
e02690af58
1 changed files with 4 additions and 2 deletions
|
@ -209,14 +209,16 @@ static void PrecacheLevel(FLevelLocals *Level)
|
|||
AddToList(hitlist.Data(), Level->skytexture2, FTextureManager::HIT_Sky);
|
||||
}
|
||||
|
||||
static const BITFIELD checkForTextureFlags = FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ReturnFirst | FTextureManager::TEXMAN_DontCreate;
|
||||
|
||||
for (auto n : gameinfo.PrecachedTextures)
|
||||
{
|
||||
FTextureID tex = TexMan.CheckForTexture(n, ETextureType::Wall, FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ReturnFirst);
|
||||
FTextureID tex = TexMan.CheckForTexture(n, ETextureType::Wall, checkForTextureFlags);
|
||||
if (tex.Exists()) AddToList(hitlist.Data(), tex, FTextureManager::HIT_Wall);
|
||||
}
|
||||
for (unsigned i = 0; i < Level->info->PrecacheTextures.Size(); i++)
|
||||
{
|
||||
FTextureID tex = TexMan.CheckForTexture(Level->info->PrecacheTextures[i], ETextureType::Wall, FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ReturnFirst);
|
||||
FTextureID tex = TexMan.CheckForTexture(Level->info->PrecacheTextures[i], ETextureType::Wall, checkForTextureFlags);
|
||||
if (tex.Exists()) AddToList(hitlist.Data(), tex, FTextureManager::HIT_Wall);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue