Implemented preliminary readNode/readImage support in the lua plugin allow a lua script to create a scene graph as return it.

This commit is contained in:
Robert Osfield
2013-10-09 15:32:56 +00:00
parent e8b5272b02
commit 9c53794bc7
5 changed files with 462 additions and 68 deletions

View File

@@ -85,6 +85,7 @@ class LuaScriptEngine : public osg::ScriptEngine
bool pushParameter(osg::Object* object);
bool popParameter(osg::Object* object);
osg::Object* popParameterObject();
void createAndPushObject(const std::string& compoundName) const;
@@ -96,11 +97,13 @@ class LuaScriptEngine : public osg::ScriptEngine
virtual ~LuaScriptEngine();
lua_State* _lua;
typedef std::set< osg::ref_ptr<osg::Script> > ScriptSet;
ScriptSet _loadedScripts;
unsigned int _scriptCount;
std::string createUniquieScriptName();
typedef std::map< osg::ref_ptr<osg::Script>, std::string> ScriptMap;
ScriptMap _loadedScripts;
mutable osgDB::PropertyInterface _pi;
};