Revert "revert #1148 as prematurely incorporated"

This reverts commit f946088214.
This commit is contained in:
marauder2k7 2024-01-20 18:01:57 +00:00
parent bd2121b674
commit 7216ba8530
22 changed files with 20385 additions and 1813 deletions

View file

@ -246,14 +246,10 @@ U32 GFXTextureObject::getEstimatedSizeInBytes() const
bool GFXTextureObject::dumpToDisk( const String &bmType, const String &path )
{
FileStream stream;
if ( !stream.open( path, Torque::FS::File::Write ) )
return false;
if ( mBitmap )
return mBitmap->writeBitmap( bmType, stream );
return mBitmap->writeBitmap( bmType, path);
GBitmap bitmap( getWidth(), getHeight(), false, getFormat() );
copyToBmp( &bitmap );
return bitmap.writeBitmap( bmType, stream );
return bitmap.writeBitmap( bmType, path);
}