go-gl / gl

Go bindings for OpenGL (generated via glow)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why `UniformMatrix3fv` accepts only a *float32?

inkeliz opened this issue · comments

First, I don't understand OpenGL to much, I'm learning about it.

There's a function UniformMatrix3fv:

func UniformMatrix3fv(location int32, count int32, transpose bool, value *float32) {
	C.glowUniformMatrix3fv(gpUniformMatrix3fv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value)))
}

However, that function is supposed to accept a array, as a value of value, as described here. I think there's no diference between WebGL and OpenGL.


But the current UniformMatrix3fv accepts *float32, not a []float32. What value is supposed to supply? If I use &myarray[0] is enough?