@@ -887,7 +887,9 @@ void SampleApp::CompareGoldenImage(const std::string& FileName, ScreenCapture::C
887887 pCtx->MapTextureSubresource (Capture.pTexture , 0 , 0 , MAP_READ, MAP_FLAG_DO_NOT_WAIT, nullptr , TexData);
888888 auto CapturedPixels = Image::ConvertImageData (TexDesc.Width , TexDesc.Height ,
889889 reinterpret_cast <const Uint8*>(TexData.pData ), static_cast <Uint32>(TexData.Stride ),
890- TexDesc.Format , TEX_FORMAT_RGBA8_UNORM, false /* Keep alpha*/ );
890+ TexDesc.Format , TEX_FORMAT_RGBA8_UNORM,
891+ /* KeepAlpha = */ false ,
892+ /* FlipY = */ m_pDevice->GetDeviceInfo ().IsGLDevice ());
891893 pCtx->UnmapTextureSubresource (Capture.pTexture , 0 , 0 );
892894
893895 auto * pGoldenImgPixels = reinterpret_cast <const Uint8*>(pGoldenImg->GetData ()->GetDataPtr ());
@@ -955,6 +957,7 @@ void SampleApp::SaveScreenCapture(const std::string& FileName, ScreenCapture::Ca
955957 Info.Height = TexDesc.Height ;
956958 Info.TexFormat = TexDesc.Format ;
957959 Info.KeepAlpha = m_ScreenCaptureInfo.KeepAlpha ;
960+ Info.FlipY = m_pDevice->GetDeviceInfo ().IsGLDevice ();
958961 Info.pData = TexData.pData ;
959962 Info.Stride = static_cast <Uint32>(TexData.Stride );
960963 Info.FileFormat = m_ScreenCaptureInfo.FileFormat ;
0 commit comments