From 74c552ea6cd7d42f5ce2c5d4ec60ef94322b6e54 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 26 Nov 2016 01:17:22 +0900 Subject: [PATCH] opengl: Should access the prototype of WebGLRenderingContext on Safari (#293) --- internal/opengl/context_js.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/opengl/context_js.go b/internal/opengl/context_js.go index 63a8b86bb..ec5484e01 100644 --- a/internal/opengl/context_js.go +++ b/internal/opengl/context_js.go @@ -62,7 +62,8 @@ func (p Program) id() programID { } func init() { - c := js.Global.Get("WebGLRenderingContext") + // Accessing the prototype is rquired on Safari. + c := js.Global.Get("WebGLRenderingContext").Get("prototype") Nearest = Filter(c.Get("NEAREST").Int()) Linear = Filter(c.Get("LINEAR").Int()) VertexShader = ShaderType(c.Get("VERTEX_SHADER").Int())