diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-08-11 10:18:04 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-08-29 17:40:28 +0200 |
commit | cde22222cff549c63045eec968c80c9db0c523f2 (patch) | |
tree | 06249bb0e01b2ed36919cec94df0480ae197e3af /vcl/source/opengl/OpenGLHelper.cxx | |
parent | f71aae75017308545d0f835de6a5e39603d17002 (diff) |
Mirror vertically the texture bitmaps for OpenGL
In case of glTF models it saves a Mirror() call.
In case of OpenGL charts it avoid flipped texts.
Change-Id: I1ac980e16bcb5ba6a9a025b638aaac3b08b4aab3
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 c028246b8b06..16dd5b7a9411 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::ConvertBitmapExToRGBABuffer(const BitmapEx& rBitmapEx, sal_uInt8* o_pRGBABuffer) +void OpenGLHelper::ConvertBitmapExToRGBATextureBuffer(const BitmapEx& rBitmapEx, sal_uInt8* o_pRGBABuffer) { long nBmpWidth = rBitmapEx.GetSizePixel().Width(); long nBmpHeight = rBitmapEx.GetSizePixel().Height(); @@ -156,7 +156,7 @@ void OpenGLHelper::ConvertBitmapExToRGBABuffer(const BitmapEx& rBitmapEx, sal_uI Bitmap::ScopedReadAccess pReadAccces( aBitmap ); AlphaMask::ScopedReadAccess pAlphaReadAccess( aAlpha ); size_t i = 0; - for (long ny = 0; ny < nBmpHeight; ny++) + for (long ny = nBmpHeight - 1; ny >= 0; ny--) { Scanline pAScan = pAlphaReadAccess ? pAlphaReadAccess->GetScanline(ny) : 0; for(long nx = 0; nx < nBmpWidth; nx++) |