diff options
Diffstat (limited to 'vcl/source/opengl/OpenGLHelper.cxx')
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index e1fbb4eb0822..c94e290ac7f0 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -146,7 +146,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,const OUString return ProgramID; } -void OpenGLHelper::ConvertBitmapExToRGBATextureBuffer(const BitmapEx& rBitmapEx, sal_uInt8* o_pRGBABuffer) +void OpenGLHelper::ConvertBitmapExToRGBATextureBuffer(const BitmapEx& rBitmapEx, sal_uInt8* o_pRGBABuffer, const bool bFlip) { long nBmpWidth = rBitmapEx.GetSizePixel().Width(); long nBmpHeight = rBitmapEx.GetSizePixel().Height(); @@ -156,7 +156,7 @@ void OpenGLHelper::ConvertBitmapExToRGBATextureBuffer(const BitmapEx& rBitmapEx, Bitmap::ScopedReadAccess pReadAccces( aBitmap ); AlphaMask::ScopedReadAccess pAlphaReadAccess( aAlpha ); size_t i = 0; - for (long ny = nBmpHeight - 1; ny >= 0; ny--) + for (long ny = (bFlip ? nBmpHeight - 1 : 0); (bFlip ? ny >= 0 : ny < nBmpHeight); (bFlip ? ny-- : ny++)) { Scanline pAScan = pAlphaReadAccess ? pAlphaReadAccess->GetScanline(ny) : 0; for(long nx = 0; nx < nBmpWidth; nx++) |