@@ -887,7 +887,9 @@ void SampleApp::CompareGoldenImage(const std::string& FileName, ScreenCapture::C
887
887
pCtx->MapTextureSubresource (Capture.pTexture , 0 , 0 , MAP_READ, MAP_FLAG_DO_NOT_WAIT, nullptr , TexData);
888
888
auto CapturedPixels = Image::ConvertImageData (TexDesc.Width , TexDesc.Height ,
889
889
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 ());
891
893
pCtx->UnmapTextureSubresource (Capture.pTexture , 0 , 0 );
892
894
893
895
auto * pGoldenImgPixels = reinterpret_cast <const Uint8*>(pGoldenImg->GetData ()->GetDataPtr ());
@@ -955,6 +957,7 @@ void SampleApp::SaveScreenCapture(const std::string& FileName, ScreenCapture::Ca
955
957
Info.Height = TexDesc.Height ;
956
958
Info.TexFormat = TexDesc.Format ;
957
959
Info.KeepAlpha = m_ScreenCaptureInfo.KeepAlpha ;
960
+ Info.FlipY = m_pDevice->GetDeviceInfo ().IsGLDevice ();
958
961
Info.pData = TexData.pData ;
959
962
Info.Stride = static_cast <Uint32>(TexData.Stride );
960
963
Info.FileFormat = m_ScreenCaptureInfo.FileFormat ;
0 commit comments