From b48813cf4899f8d457d155cf39a16474bced0568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 20 Mar 2018 17:54:30 -0700 Subject: [PATCH] Cleanup. --- examples/07-callback/callback.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/07-callback/callback.cpp b/examples/07-callback/callback.cpp index 87d5fd8a1..9a8bea823 100644 --- a/examples/07-callback/callback.cpp +++ b/examples/07-callback/callback.cpp @@ -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);