Hi Jose,
On 11/11/06, Jose Luis Hidalgo <[EMAIL PROTECTED]> wrote:
> Very nice. One small point, it might be worth naming loadFile to
> readNodeFile() to be consistent with the core OSG, although perhaps
> this should be in the osgDB table.
I've changed the functions from:
osgLua.load -> osgLua.loadWrapper
osgLua.loadFile -> osgLua.loadObjectFile
In osgDB there are osgDB::readNodeFile, readImageFile, readHeightField
and readObjectFile. readNodeFile and readImageFile are the
important and comonly used ones though.
And you are right, loadObjectFile shoud be in the osgDB table, but
osgIntrospection currently doesn't wraps global functions, thats why I
map that function inside the osgLua table (because is really useful)
Although you can write:
osgLua.loadWrapper("osgDB")
osgDB.loadObjectFile = osgLua.loadObjectFile
But I reckon this is not a beautiful solution. :P
I wonder if you could hide some of the hardwired global function
wrapping inside the loadWrapper(string) function. For instance have a
crude if (lib=="osgDB") then setuposdb_globalfunctions() end. This
would hide all the implementaion details away from the average user.
> Wow small world you got there. Perhaps being the same lab is an
> advatange, means that you can bounce ideas and solutions off each
> other.
It's more like a friendly and very sane competition between lua and
python: "I can do this more elegant than you do with that
scripting-like-language" (Lua is winning of course) XDDDD in fact we
are improving a lot both packages talking about features we are going
to code next.
Its certainly good to have some friendly competition. Python and Lua
are two very powerful languages. Both with strengths and few big
weaknesses. The fact that you'll be exposing similiar functions in
similiar ways is good for the OSG as users will be able to be able to
cross skills over between the two easily, and docs will also cross
over well.
Another area I'm thinking about is whether we can write most OSG
examples in a scripting language. This would make it easier to
distribute examples, and also cut down on compile times and footprints
for the OSG distribution.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/