~eliasnaur/gio

02cd2f016e2bf7982c6385db8de0cb47a3c9166d — Elias Naur 11 days ago 2124ab2
wip k4 glClear

Signed-off-by: Elias Naur <mail@eliasnaur.com>
1 files changed, 11 insertions(+), 2 deletions(-)

M gpu/compute.go
M gpu/compute.go => gpu/compute.go +11 -2
@@ 417,8 417,6 @@ func (g *compute) Frame() error {
			return err
		}
	}
	g.ctx.BindFramebuffer(g.output.fbo)
	g.ctx.Clear(0, 0, 0, 0)
	if err := g.uploadImages(); err != nil {
		return err
	}


@@ 1296,6 1294,17 @@ func (c *collector) encode(viewport image.Point, enc *encoder, texOps *[]texture
			op.clipStack[i].union = union
		}

		// Clear background of layer.
		if fillMode != scene.FillModeNonzero {
			enc.fillMode(scene.FillModeNonzero)
			fillMode = scene.FillModeNonzero
		}
		enc.rect(layout.FRect(image.Rectangle{
			Min: place.Pos,
			Max: place.Pos.Add(size),
		}))
		enc.fillColor(color.RGBA{A: 50})

		inv := f32.Affine2D{}.Offset(offf)
		enc.transform(inv)
		for i := len(op.clipStack) - 1; i >= 0; i-- {