removed the alpha tex clear

This commit is contained in:
Thomas Friedel 2020-03-21 16:19:35 +01:00
parent 1b94cf0703
commit 7830bb2cc5

View file

@ -175,6 +175,12 @@ func (b *GoGLBackend) FillImageMask(style *backendbase.FillStyle, mask *image.Al
off := y * mask.Stride
gl.TexSubImage2D(gl.TEXTURE_2D, 0, 0, int32(alphaTexSize-1-y), int32(w), 1, gl.ALPHA, gl.UNSIGNED_BYTE, gl.Ptr(&mask.Pix[off]))
}
if h < alphaTexSize {
gl.TexSubImage2D(gl.TEXTURE_2D, 0, 0, int32(alphaTexSize-1-h), int32(w), 1, gl.ALPHA, gl.UNSIGNED_BYTE, gl.Ptr(&zeroes[0]))
}
if w < alphaTexSize {
gl.TexSubImage2D(gl.TEXTURE_2D, 0, int32(w), int32(alphaTexSize-1-h), 1, int32(h), gl.ALPHA, gl.UNSIGNED_BYTE, gl.Ptr(&zeroes[0]))
}
if style.Blur > 0 {
b.offscr1.alpha = true
@ -215,10 +221,6 @@ func (b *GoGLBackend) FillImageMask(style *backendbase.FillStyle, mask *image.Al
gl.StencilFunc(gl.ALWAYS, 0, 0xFF)
for y := 0; y < h; y++ {
gl.TexSubImage2D(gl.TEXTURE_2D, 0, 0, int32(alphaTexSize-1-y), int32(w), 1, gl.ALPHA, gl.UNSIGNED_BYTE, gl.Ptr(&zeroes[0]))
}
gl.ActiveTexture(gl.TEXTURE0)
if style.Blur > 0 {