- moved the material class to 'common' as well.
This commit is contained in:
parent
580e463498
commit
65f15e1147
7 changed files with 53 additions and 59 deletions
|
|
@ -51,10 +51,23 @@ static void PrecacheTexture(FTexture *tex, int cache)
|
|||
if (cache & (FTextureManager::HIT_Wall | FTextureManager::HIT_Flat | FTextureManager::HIT_Sky))
|
||||
{
|
||||
FMaterial * gltex = FMaterial::ValidateTexture(tex, false);
|
||||
if (gltex) gltex->Precache();
|
||||
if (gltex) screen->PrecacheMaterial(gltex, 0);
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
static void PrecacheList(FMaterial *gltex, SpriteHits& translations)
|
||||
{
|
||||
gltex->tex->SystemTextures.CleanUnused(translations, gltex->isExpanded());
|
||||
SpriteHits::Iterator it(translations);
|
||||
SpriteHits::Pair* pair;
|
||||
while (it.NextPair(pair)) screen->PrecacheMaterial(gltex, pair->Key);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// DFrameBuffer :: PrecacheSprite
|
||||
|
|
@ -64,7 +77,7 @@ static void PrecacheTexture(FTexture *tex, int cache)
|
|||
static void PrecacheSprite(FTexture *tex, SpriteHits &hits)
|
||||
{
|
||||
FMaterial * gltex = FMaterial::ValidateTexture(tex, true);
|
||||
if (gltex) gltex->PrecacheList(hits);
|
||||
if (gltex) PrecacheList(gltex, hits);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue