set global alpha
This commit is contained in:
parent
287ff8905f
commit
abfc73419b
2 changed files with 2 additions and 0 deletions
|
@ -38,6 +38,7 @@ func (b *GoGLBackend) Clip(pts [][2]float64) {
|
|||
gl.UseProgram(b.sr.ID)
|
||||
gl.Uniform4f(b.sr.Color, 1, 1, 1, 1)
|
||||
gl.Uniform2f(b.sr.CanvasSize, float32(b.fw), float32(b.fh))
|
||||
gl.Uniform1f(b.sr.GlobalAlpha, 1)
|
||||
gl.EnableVertexAttribArray(b.sr.Vertex)
|
||||
|
||||
gl.ColorMask(false, false, false, false)
|
||||
|
|
|
@ -115,6 +115,7 @@ func (b *GoGLBackend) Fill(style *backendbase.FillStyle, pts [][2]float64) {
|
|||
gl.UseProgram(b.sr.ID)
|
||||
gl.Uniform4f(b.sr.Color, 0, 0, 0, 0)
|
||||
gl.Uniform2f(b.sr.CanvasSize, float32(b.fw), float32(b.fh))
|
||||
gl.Uniform1f(b.sr.GlobalAlpha, 1)
|
||||
|
||||
gl.EnableVertexAttribArray(b.sr.Vertex)
|
||||
gl.VertexAttribPointer(b.sr.Vertex, 2, gl.FLOAT, false, 0, nil)
|
||||
|
|
Loading…
Reference in a new issue