From 8c9a11ddf4abae04a21dc1aec70c0ddb8c6bcc52 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 24 Jun 2018 02:02:35 +0900 Subject: [PATCH] opengl: Rely on gopherwasm for typed-array creation --- internal/opengl/context_js.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/opengl/context_js.go b/internal/opengl/context_js.go index 6e611b03d..4dd52cb16 100644 --- a/internal/opengl/context_js.go +++ b/internal/opengl/context_js.go @@ -370,9 +370,7 @@ func (c *Context) UniformFloats(p Program, location string, v []float32) { case 4: gl.Call("uniform4f", js.Value(l), v[0], v[1], v[2], v[3]) case 16: - u8 := js.ValueOf(v) - m := float32Array.New(u8.Get("buffer"), u8.Get("byteOffset"), 16) - gl.Call("uniformMatrix4fv", js.Value(l), false, m) + gl.Call("uniformMatrix4fv", js.Value(l), false, js.ValueOf(v)) default: panic("not reached") }