0

I am using LuaJIT with OpenGL ES 2.0 as a way to rapidly create some 3D interactive scenes.

I have been busy reinventing the wheel, making my own vector library. My question is, does anyone else have experience with this sort of thing? Are there libraries out there? Are there libraries built for LuaJIT specifically (using LuaJIT's FFI)?

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
chowey
  • 9,138
  • 6
  • 54
  • 84
  • I was also looking at using LuaJIT's FFI to hook into BLAS and LAPACK. I don't know if this is worth it for the small 2, 3 or 4 component vectors/matrices used in OpenGL. Anyone have experience with this? – chowey Mar 14 '13 at 03:48

1 Answers1

1

You can take a look here: https://github.com/Wiladams/TINN/tree/master/src/graphics

math_matrix.lua contains a generalized matrix class. It is essentially a "template" for different matrix types, including "vector" types, which are just matrices of one dimension.