From 2739547c129979ffd107752c6dfa648c81d1b6d2 Mon Sep 17 00:00:00 2001 From: Inkeliz Date: Sun, 6 Dec 2020 05:33:36 +0000 Subject: [PATCH] internal/glimpl: [wasm] fix WebGL 1 support v2 Signed-off-by: Inkeliz --- internal/glimpl/gl_js.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/glimpl/gl_js.go b/internal/glimpl/gl_js.go index ad02616a..ba862d06 100644 --- a/internal/glimpl/gl_js.go +++ b/internal/glimpl/gl_js.go @@ -30,7 +30,7 @@ func NewFunctions(ctx Context) (*Functions, error) { func (f *Functions) Init() error { webgl2Class := js.Global().Get("WebGL2RenderingContext") - iswebgl2 := !webgl2Class.IsNull() && f.Ctx.InstanceOf(webgl2Class) + iswebgl2 := !webgl2Class.IsUndefined() && f.Ctx.InstanceOf(webgl2Class) if !iswebgl2 { f.EXT_disjoint_timer_query = f.getExtension("EXT_disjoint_timer_query") if f.getExtension("OES_texture_half_float").IsNull() && f.getExtension("OES_texture_float").IsNull() {