Added support for Lua 5.2 and osg::Object creation from within Lua scripts.

This commit is contained in:
Robert Osfield
2013-10-04 16:30:25 +00:00
parent c77dc4fe9e
commit 79e2d1309f
4 changed files with 204 additions and 14 deletions

View File

@@ -474,6 +474,28 @@ int main(int argc, char** argv)
}
osg::ref_ptr<osg::Object> obj = pi.createObject("osgVolume::VolumeTile");
if (obj.valid()) { OSG_NOTICE<<"obj created "<<obj->getCompoundClassName()<<std::endl; }
else { OSG_NOTICE<<"obj creation failed "<<std::endl; }
osgDB::PropertyInterface::PropertyMap properties;
if (pi.getSupportedProperties(obj.get(), properties, true))
{
OSG_NOTICE<<"Have supported properites found."<<std::endl;
for(osgDB::PropertyInterface::PropertyMap::iterator itr = properties.begin();
itr != properties.end();
++itr)
{
OSG_NOTICE<<" Property "<<itr->first<<", "<<pi.getTypeName(itr->second)<<std::endl;
}
}
else
{
OSG_NOTICE<<"No supported properites found."<<std::endl;
}
//return 0;
return viewer.run();