summaryrefslogtreecommitdiff
path: root/vcl/opengl/gdiimpl.cxx
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>2014-11-17 10:00:33 -0500
committerMichael Meeks <michael.meeks@collabora.com>2014-11-17 22:39:46 +0000
commit95017eaf851c6b97db38cd226b6bea661e73dc60 (patch)
treea720f33abd1958cc321f2b4f0b9196875fcecc5a /vcl/opengl/gdiimpl.cxx
parent2d12d89632e6939b0d34af3b8830cbb2b0257629 (diff)
vcl: Fix DrawMask implementation in OpenGL backend
Change-Id: Idc0bedaba5a4cea351f131d402c2b1093ac1c53c
Diffstat (limited to 'vcl/opengl/gdiimpl.cxx')
-rw-r--r--vcl/opengl/gdiimpl.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 339f3c6bb571..ab6b95f68a23 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -406,7 +406,7 @@ bool OpenGLSalGraphicsImpl::CreateMaskProgram( void )
glBindAttribLocation( mnMaskProgram, GL_ATTRIB_POS, "position" );
glBindAttribLocation( mnMaskProgram, GL_ATTRIB_TEX, "tex_coord_in" );
mnMaskUniform = glGetUniformLocation( mnMaskProgram, "sampler" );
- mnMaskColorUniform = glGetUniformLocation( mnMaskProgram, "mask" );
+ mnMaskColorUniform = glGetUniformLocation( mnMaskProgram, "color" );
CHECK_GL_ERROR();
return true;
@@ -844,7 +844,7 @@ void OpenGLSalGraphicsImpl::DrawTextureWithMask( OpenGLTexture& rTexture, OpenGL
CHECK_GL_ERROR();
}
-void OpenGLSalGraphicsImpl::DrawMask( OpenGLTexture& rMask, SalColor nMaskColor, const SalTwoRect& /*pPosAry*/ )
+void OpenGLSalGraphicsImpl::DrawMask( OpenGLTexture& rMask, SalColor nMaskColor, const SalTwoRect& pPosAry )
{
if( mnMaskProgram == 0 )
{
@@ -858,7 +858,10 @@ void OpenGLSalGraphicsImpl::DrawMask( OpenGLTexture& rMask, SalColor nMaskColor,
glActiveTexture( GL_TEXTURE0 );
rMask.Bind();
- //DrawTextureRect( rMask, pPosAry );
+ glEnable( GL_BLEND );
+ glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
+ DrawTextureRect( rMask, pPosAry );
+ glDisable( GL_BLEND );
rMask.Unbind();
glUseProgram( 0 );