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
+2 -2
View File
@@ -22,7 +22,7 @@ func CreateProgram(ctx *Functions, vsSrc, fsSrc string, attribs []string) (Progr
}
defer ctx.DeleteShader(fs)
prog := ctx.CreateProgram()
if prog == (Program{}) {
if !prog.Valid() {
return Program{}, errors.New("glCreateProgram failed")
}
ctx.AttachShader(prog, vs)
@@ -49,7 +49,7 @@ func GetUniformLocation(ctx *Functions, prog Program, name string) Uniform {
func createShader(ctx *Functions, typ Enum, src string) (Shader, error) {
sh := ctx.CreateShader(typ)
if sh == (Shader{}) {
if !sh.Valid() {
return Shader{}, errors.New("glCreateShader failed")
}
ctx.ShaderSource(sh, src)