opengl: Refactoring

This commit is contained in:
Hajime Hoshi 2018-06-23 04:43:56 +09:00
parent 33e4f82d7c
commit ff86f8bd93

View File

@ -371,7 +371,7 @@ func (c *Context) UniformFloats(p Program, location string, v []float32) {
gl.Call("uniform4f", js.Value(l), v[0], v[1], v[2], v[3]) gl.Call("uniform4f", js.Value(l), v[0], v[1], v[2], v[3])
case 16: case 16:
u8 := js.ValueOf(v) u8 := js.ValueOf(v)
m := float32Array.New(u8.Get("buffer"), u8.Get("byteOffset").Int(), 16) 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, m)
default: default:
panic("not reached") panic("not reached")