Cleanup.
This commit is contained in:
parent
f10d4c1646
commit
b48813cf48
@ -69,13 +69,13 @@ static const uint16_t s_cubeIndices[36] =
|
||||
6, 3, 7,
|
||||
};
|
||||
|
||||
void savePng(const char* _filePath, uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src, bool _grayscale, bool _yflip)
|
||||
void savePng(const char* _filePath, uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src, bimg::TextureFormat::Enum _format, bool _yflip)
|
||||
{
|
||||
bx::FileWriter writer;
|
||||
bx::Error err;
|
||||
if (bx::open(&writer, _filePath, false, &err) )
|
||||
{
|
||||
bimg::imageWritePng(&writer, _width, _height, _srcPitch, _src, _grayscale, _yflip, &err);
|
||||
bimg::imageWritePng(&writer, _width, _height, _srcPitch, _src, _format, _yflip, &err);
|
||||
bx::close(&writer);
|
||||
}
|
||||
}
|
||||
@ -188,7 +188,7 @@ struct BgfxCallback : public bgfx::CallbackI
|
||||
|
||||
// Save screen shot as PNG.
|
||||
bx::snprintf(temp, BX_COUNTOF(temp), "%s.png", _filePath);
|
||||
savePng(temp, _width, _height, _pitch, _data, false, _yflip);
|
||||
savePng(temp, _width, _height, _pitch, _data, bimg::TextureFormat::BGRA8, _yflip);
|
||||
|
||||
// Save screen shot as TGA.
|
||||
bx::snprintf(temp, BX_COUNTOF(temp), "%s.tga", _filePath);
|
||||
|
Loading…
Reference in New Issue
Block a user