classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
| luabind-user

I'm trying to use LuaBind to export OpenSceneGraph classes, in order to use those classes in lua script.However OSG uses auto pointer to hold memory, thus the destructor is declared to be protected.I choose to use the smart pointer provided by OSG to hold the class, using the follow code:
void registerOsg(lua_State* lua)
using namespace luabind;
.def(constructor<float, float, float>())
.def("valid", &osg::Vec3f::valid)
.def("set", (void(osg::Vec3f::*)(float, float, float))&osg::Vec3f::set),

class_<osg::Node, osg::ref_ptr<osg::Node>>("Node")
But I get the error message in which says “cannot access protected member osg::Node::~Node".I confirmed that get_pointer() function is provided by osg::ref_ptr.I also followed the way in, but it does not work anywhere.

So,is there any idea for me?Really appreciate your reply!


Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt!
luabind-user mailing list
[hidden email]