[luabind] C++ Object pointers in Lua
Brought to you by:
arvidn,
daniel_wallin
From: Peter D. <pet...@gm...> - 2010-01-13 21:49:20
|
Hello, I have a class exported with Luabind which works perfectly if is always inside Lua. a = MyObject() a:doSomething() This all works perfectly... But I haven't figured out how to work on an instance created in C++, for example: MyObject* a = new MyObject(); /* pass the pointer to Lua here */ And now in Lua: a:doSomething(); So my previously created instance in C++ can be worked upon in Lua, and once finished will be updated and working in C++ How can I do this? Thanks in advance, Peter. |