GLM + SWIG + LUA

Im trying to use swig to be able to allow the users of my engine to use all the sweetness of GLM via Lua, but Im having a hard time creating the swig interface file for it.

Is there anybody who have successfully bee able to create a swig interface file for GLM? If yes I would be more than curious to check it out, I keep having tons of errors while generating no sure what Im doing wrong…

It’s rather hard to help you when you give us virtually no actual information about what you’re doing aside from the general idea of binding GLM to Lua via SWIG. What does your SWIG file look like, what errors are you getting, what compiler are you using?

Help us help you. You’re much more likely to get help by providing that information than asking for someone who just so happens to have used SWIG to attach a vector/matrix library like GLM to Lua.

If you want it to be very Lua-like SWIG will probably be difficult since it’s a lot about operators/swizzles/etc. I needed GLM in Python and dropped using SWIG shortly after and went with pure Python C-API: https://github.com/Queatz/glmpython

If you do find a clean way to do it with SWIG do let me know, if then it could just be wrapped to many languages.