Skip to content

Commit

Permalink
removed the alpha tex clear
Browse files Browse the repository at this point in the history
  • Loading branch information
tfriedel6 committed Mar 21, 2020
1 parent 1b94cf0 commit 7830bb2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions backend/goglbackend/fill.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 7830bb2

Please sign in to comment.