mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
opengl: Rely on gopherwasm for typed-array creation
This commit is contained in:
parent
5aefa837db
commit
8c9a11ddf4
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user