go.mobile/gl: fix typos.

Fixes golang/go#9151.

LGTM=crawshaw
R=crawshaw, nathan.behary
CC=golang-codereviews
https://golang.org/cl/180160043
This commit is contained in:
Shenghou Ma 2014-11-23 17:42:30 -05:00
parent 2d225d30b6
commit f456aa415e
1 changed files with 16 additions and 16 deletions

View File

@ -27,22 +27,22 @@ func (u Uniform) WriteAffine(a *f32.Affine) {
// WriteMat4 writes the contents of a 4x4 matrix to a GL uniform. // WriteMat4 writes the contents of a 4x4 matrix to a GL uniform.
func (u Uniform) WriteMat4(p *f32.Mat4) { func (u Uniform) WriteMat4(p *f32.Mat4) {
var m [16]float32 var m [16]float32
m[0*3+0] = p[0][0] m[0*4+0] = p[0][0]
m[0*3+1] = p[1][0] m[0*4+1] = p[1][0]
m[0*3+2] = p[2][0] m[0*4+2] = p[2][0]
m[0*3+3] = p[3][0] m[0*4+3] = p[3][0]
m[1*3+0] = p[0][1] m[1*4+0] = p[0][1]
m[1*3+1] = p[1][1] m[1*4+1] = p[1][1]
m[1*3+2] = p[2][1] m[1*4+2] = p[2][1]
m[1*3+3] = p[3][1] m[1*4+3] = p[3][1]
m[2*3+0] = p[0][2] m[2*4+0] = p[0][2]
m[2*3+1] = p[1][2] m[2*4+1] = p[1][2]
m[2*3+2] = p[2][2] m[2*4+2] = p[2][2]
m[2*3+3] = p[3][2] m[2*4+3] = p[3][2]
m[3*3+0] = p[0][3] m[3*4+0] = p[0][3]
m[3*3+1] = p[1][3] m[3*4+1] = p[1][3]
m[3*3+2] = p[2][3] m[3*4+2] = p[2][3]
m[3*3+3] = p[3][3] m[3*4+3] = p[3][3]
UniformMatrix4fv(u, m[:]) UniformMatrix4fv(u, m[:])
} }