Merge pull request #1148 from marauder2k9-torque/STBImageLoading-PR

Stb image loading
This commit is contained in:
Brian Roberts 2024-01-01 08:48:46 -06:00 committed by GitHub
commit 51426a3575
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 20385 additions and 1813 deletions

View file

@ -44,18 +44,12 @@ public:
/// Pushes a new frame into the video stream
bool pushFrame( GBitmap * bitmap )
{
FileStream fs;
String framePath = mPath + String::ToString("%.6u.png", mCurrentFrame);
if ( !fs.open( framePath, Torque::FS::File::Write ) )
{
Con::errorf( "VideoEncoderPNG::pushFrame() - Failed to open output file '%s'!", framePath.c_str() );
return false;
}
//Increment
mCurrentFrame++;
bool result = bitmap->writeBitmap("png", fs, 0);
bool result = bitmap->writeBitmap("png", framePath, 0);
pushProcessedBitmap(bitmap);
return result;
@ -73,4 +67,4 @@ public:
}
};
REGISTER_VIDEO_ENCODER(VideoEncoderPNG, PNG)
REGISTER_VIDEO_ENCODER(VideoEncoderPNG, PNG)