Original Post
Hi there,
I'm using Luabind in combination with IrrLicht. Now I'm trying to bind functions:
in Cpp:
Bindings:
test script in lua:
Irrlicht loads model ("Loaded mesh: sydney.md2"), but didn't show it. I think it's because returned value from LoadMesh was lost. Can anyone explain where I made mistake?
Thanks in advance, and sorry for my bad english.
I'm using Luabind in combination with IrrLicht. Now I'm trying to bind functions:
in Cpp:
IAnimatedMesh* LoadMesh(const char* path) { return smgr->getMesh(path); } IAnimatedMeshSceneNode* SetMesh(IAnimatedMesh* mesh) { return smgr->addAnimatedMeshSceneNode( mesh ); } Bindings:
module(L) [ def("LoadMesh", &LoadMesh)]; module(L) [ def("SetMesh", &SetMesh)]; test script in lua:
tmp_var=LoadMesh("sydney.md2") tmp2=SetMesh(tmp_var)Irrlicht loads model ("Loaded mesh: sydney.md2"), but didn't show it. I think it's because returned value from LoadMesh was lost. Can anyone explain where I made mistake?
Thanks in advance, and sorry for my bad english.