I've been trying out Go for a while now, and I'm currently checking out
go-gl and the glam library. The glam library handles GLSL types (matrices,
vectors etc). The matrix is defined as: type Mat4 [16]float32. Originally
it was [4][4]float32, but go-gl requires *[16]float32. The type has several
methods associated with it.
Now, my problem is that I wish to cast Mat4 back to [16]float32: mat :=
[16]float32(matrix)
Interestingly it works sometimes; I can build the *renderer* package
without any problems (and run associated tests!), but when I try to compile
the *main* package, the compiler complains about the cast. Does it have to
do with the associated methods? Any ideas what I'm doing wrong (and why it
works sometimes)?
Thanks!
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.