mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Bug fixes:
Generating image previews of image assets was failing DDS remove redundant check for stream status. STB requires the file to be free before being written to, move check to make sure we can open the path into gBitmap and remove FileStream checks from everywhere else.
This commit is contained in:
parent
0b451aa7b5
commit
63682c43ec
11 changed files with 39 additions and 111 deletions
|
|
@ -316,16 +316,9 @@ void ImposterCapture::_separateAlpha( GBitmap *imposterOut )
|
|||
|
||||
if ( 0 )
|
||||
{
|
||||
FileStream fs;
|
||||
if ( fs.open( "./imposterout.png", Torque::FS::File::Write ) )
|
||||
imposterOut->writeBitmap( "png", "./imposterout.png" );
|
||||
imposterOut->writeBitmap("png", "./imposterout.png");
|
||||
|
||||
fs.close();
|
||||
|
||||
if ( fs.open( "./temp.png", Torque::FS::File::Write ) )
|
||||
bmp->writeBitmap( "png", "./temp.png" );
|
||||
|
||||
fs.close();
|
||||
bmp->writeBitmap("png", "./temp.png");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -482,26 +475,13 @@ void ImposterCapture::capture( const MatrixF &rotMatrix,
|
|||
if ( 0 )
|
||||
{
|
||||
// Render out the bitmaps for debug purposes.
|
||||
FileStream fs;
|
||||
if ( fs.open( "./blackbmp.png", Torque::FS::File::Write ) )
|
||||
mBlackBmp->writeBitmap( "png", "./blackbmp.png" );
|
||||
mBlackBmp->writeBitmap( "png", "./blackbmp.png" );
|
||||
|
||||
fs.close();
|
||||
mWhiteBmp->writeBitmap( "png", "./whitebmp.png" );
|
||||
|
||||
if ( fs.open( "./whitebmp.png", Torque::FS::File::Write ) )
|
||||
mWhiteBmp->writeBitmap( "png", "./whitebmp.png" );
|
||||
(*normalMapOut)->writeBitmap( "png", "./normalbmp.png" );
|
||||
|
||||
fs.close();
|
||||
|
||||
if ( fs.open( "./normalbmp.png", Torque::FS::File::Write ) )
|
||||
(*normalMapOut)->writeBitmap( "png", "./normalbmp.png" );
|
||||
|
||||
fs.close();
|
||||
|
||||
if ( fs.open( "./finalimposter.png", Torque::FS::File::Write ) )
|
||||
(*imposterOut)->writeBitmap( "png", "./finalimposter.png" );
|
||||
|
||||
fs.close();
|
||||
(*imposterOut)->writeBitmap( "png", "./finalimposter.png" );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue