- 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:
parent
ebbe9c84f8
commit
465bcfd199
5 changed files with 29 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue