lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi group,

I have been reading lua mailing list for quite some time, and decided
to share something small that I wrote these days.

Using Mike Pall's awesome FFI, I was able to quickly bind GLFW, OpenGL
and OpenCL, and ported few small examples (Planning on bigger).

http://github.com/malkia/luajit-opencl

I'll probably change the name to something else.

All the bindings were done outside the standard way of doing bindings,
but only using the FFI.
So far I've had only one issue, not being able to do callbacks (as
Mike explained lua -> FFI -> C -> lua).
I've looked for workarounds, and found that using GLFW, instead of
GLUT would do it.
GLUT requires handlers for display, reshape, etc. function, while
although GLFW although can do them through callbacks, one can do by
simply creating it's own loop, and polling.

I'm thinking that I might be able to use this as Maya/MotionBuilder
plugin (instead of MEL, C++ or python). I guess I'll recompile luajit
as DLL, and hook it someway.
I really want to just code, and not compile, restart, etc. and lua allows that.

Thank you,
Dimiter "malkia" Stanev,
malkia@gmail.com