diff options
author | Louis-Francis Ratté-Boulianne <lfrb@collabora.com> | 2014-11-10 17:28:15 -0500 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-11-11 11:08:24 +0100 |
commit | 2dbd426c3b62b4a5b76da7a4b191059b2432c0e9 (patch) | |
tree | cb66cf558b65180415d43c149b8ffc5b22566d5a /vcl | |
parent | 243047fd68820e15e13dd9afd33122aef20ca377 (diff) |
vcl: Fix alpha value when drawing bitmap with mask
Change-Id: Ie9cbd754383296a9fe6e42346d4a17477eb88242
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 2 | ||||
-rw-r--r-- | vcl/opengl/maskedTextureFragmentShader.glsl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 94cba660e413..80a5414978b5 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -515,7 +515,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 badf91e6edae..4d79ae9927cc 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: */ |