Jan Ciger wrote: > Actually, I think that the focus should be on providing a meaningful API > to export to these languages. That could even mean a wrapper in order to > eliminate/minimize usage of pointers and some C++ functionality that is > difficult to translate (templates?). Once you have that, the language > bindings could be done very quickly for almost any language, even in an > automated way (e.g. using SWIG or something similar). Ideally, the > wrappers should be made automatically from the current code.
I've been using osgswig ( http://code.google.com/p/osgswig/ ) for a project on a cave-type system combining python, vrjuggler, and osg. osgswig supports python, ruby, java and lua, although I've only played with the python features. I had tried to use osgPython and pyosg before, but they only work with older versions of osg. Jan Ciger wrote: >/ 1) Application is written in C/C++ and calls embedded scripts. This is/ >/ fairly typical for game development - game is written in C/C++ and e.g./ >/ AI is scripted using a built-in scripting engine. Here Lua is great (it/ >/ was written for it), because it is fairly easy to maintain separation/ >/ between different scripts (exception/error in one script does not crash/ >/ the whole thing). Furthermore, Lua is really tiny, with negligible/ >/ overhead. Another contender is Javascript (e.g. VRML standard uses it/ >/ for exactly this purpose). I wouldn't target this case, because it is/ >/ very application-specific and there is little a generic scene graph/ >/ binding could provide to it. /// >/ 2) Application is written in a high level language and calls into C/C++/ >/ code to run the performance critical stuff. I think that this is what/ >/ you want ("... enable us to/ >/ develop applications purely from scripting languages, so developers in/ >/ this realm would just need the binaries to the OSG installed, and no/ >/ need for C++ dev environment"). /The osgswig project seems to be primarily designed for scenario 2, although in my application I've been using osgswig as in scenario 1 by getting out a void pointer to the opaque values from the python api. I'm not sure how possible this approach is with other languages though. ~ James _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

