[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl' - 2 commits - vcl/opengl vcl/workben

Louis-Francis Ratté-Boulianne lfrb at collabora.com
Mon Nov 10 14:56:12 PST 2014


 vcl/opengl/gdiimpl.cxx                      |    2 +-
 vcl/opengl/maskedTextureFragmentShader.glsl |    2 +-
 vcl/workben/vcldemo.cxx                     |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 46e8601878104c4c18944c78b29d4198d84775eb
Author: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
Date:   Mon Nov 10 17:54:52 2014 -0500

    vcl: Fix the VirtualDevice rectangle rendering in vcldemo
    
    Change-Id: I43d43d5e81d52560154b102cc469761b51a590d4

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index cd3e32e..16574d9 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -281,7 +281,7 @@ public:
 
     void fetchDrawBitmap(OutputDevice &rDev, Rectangle r)
     {
-        Bitmap aBitmap(GetBitmap(Point(0,0),rDev.GetOutputSizePixel()));
+        Bitmap aBitmap(rDev.GetBitmap(Point(0,0),rDev.GetOutputSizePixel()));
         aBitmap.Scale(r.GetSize(), BMP_SCALE_BESTQUALITY);
         rDev.DrawBitmap(r.TopLeft(), aBitmap);
     }
commit fea6a6bc3c995498caf8869a83eed3c97216f336
Author: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
Date:   Mon Nov 10 17:28:15 2014 -0500

    vcl: Fix alpha value when drawing bitmap with mask
    
    Change-Id: Ie9cbd754383296a9fe6e42346d4a17477eb88242

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 900d361..6413283 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -497,7 +497,7 @@ void OpenGLSalGraphicsImpl::DrawTextureWithMask( GLuint nTexture, GLuint nMask,
     glBindTexture( GL_TEXTURE_2D, nMask );
 
     glEnable( GL_BLEND );
-    glBlendFunc( GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA );
+    glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
     DrawTextureRect( rSize, pPosAry );
     glDisable( GL_BLEND );
 
diff --git a/vcl/opengl/maskedTextureFragmentShader.glsl b/vcl/opengl/maskedTextureFragmentShader.glsl
index badf91e..4d79ae9 100644
--- a/vcl/opengl/maskedTextureFragmentShader.glsl
+++ b/vcl/opengl/maskedTextureFragmentShader.glsl
@@ -17,7 +17,7 @@ void main() {
     texel0 = texture2D(sampler, tex_coord);
     texel1 = texture2D(mask, tex_coord);
     gl_FragColor = texel0;
-    gl_FragColor.a = texel1.r;
+    gl_FragColor.a = 1.0 - texel1.r;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list