- Added a PrecacheTexture virtual function to DFrameBuffer because it's the

renderer which should decide how to precache a texture.


SVN r723 (trunk)
This commit is contained in:
Christoph Oelckers 2008-01-28 10:23:18 +00:00
commit 465bcfd199
5 changed files with 29 additions and 14 deletions

View file

@ -1316,6 +1316,27 @@ void DFrameBuffer::CopyPixelData(BYTE * buffer, int texpitch, int texheight, int
}
}
//===========================================================================
//
// Texture precaching
//
//===========================================================================
void DFrameBuffer::PrecacheTexture(FTexture *tex, bool cache)
{
if (tex != NULL)
{
if (cache)
{
tex->GetPixels ();
}
else
{
tex->Unload ();
}
}
}
//===========================================================================
//
// Render the view