Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
95017eaf
Kaydet (Commit)
95017eaf
authored
Kas 17, 2014
tarafından
Louis-Francis Ratté-Boulianne
Kaydeden (comit)
Michael Meeks
Kas 17, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: Fix DrawMask implementation in OpenGL backend
Change-Id: Idc0bedaba5a4cea351f131d402c2b1093ac1c53c
üst
2d12d896
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
gdiimpl.cxx
vcl/opengl/gdiimpl.cxx
+6
-3
maskFragmentShader.glsl
vcl/opengl/maskFragmentShader.glsl
+5
-5
No files found.
vcl/opengl/gdiimpl.cxx
Dosyayı görüntüle @
95017eaf
...
...
@@ -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
);
...
...
vcl/opengl/maskFragmentShader.glsl
Dosyayı görüntüle @
95017eaf
...
...
@@ -7,15 +7,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
precision
mediump
float
;
varying
vec2
tex_coord
;
uniform
sampler2D
sampler
;
uniform
vec4
color
;
"
uniform
vec4
color
;
void
main
()
{
vec4 texel0;
texel0 = texture2D(sampler, tex_coord);
gl_FragColor = color * texel0.a;
vec4
texel0
;
texel0
=
texture2D
(
sampler
,
tex_coord
);
gl_FragColor
=
color
;
gl_FragColor
.
a
=
1
.
0
-
texel0
.
r
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment