app/internal/gl: support Go 1.14 change to WebAssembly's js.Value

Gio programs will no longer build with Go 1.13; let's keep it at that
until someone complains.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-06 17:59:39 +01:00
parent c3533c3f84
commit 62da32be9c
7 changed files with 53 additions and 21 deletions
+3 -3
View File
@@ -409,7 +409,7 @@ func (g *GPU) setErr(err error) {
}
func (r *renderer) texHandle(t *texture) gl.Texture {
if t.id != (gl.Texture{}) {
if t.id.Valid() {
return t.id
}
t.id = createTexture(r.ctx)
@@ -419,7 +419,7 @@ func (r *renderer) texHandle(t *texture) gl.Texture {
}
func (t *texture) release(ctx *context) {
if t.id != (gl.Texture{}) {
if t.id.Valid() {
ctx.DeleteTexture(t.id)
}
}
@@ -898,7 +898,7 @@ func (r *renderer) drawOps(ops []imageOp) {
case clipTypeIntersection:
fbo = r.pather.stenciler.intersections.fbos[img.place.Idx]
}
if coverTex != fbo.tex {
if !coverTex.Equal(fbo.tex) {
coverTex = fbo.tex
r.ctx.ActiveTexture(gl.TEXTURE1)
r.ctx.BindTexture(gl.TEXTURE_2D, coverTex)