Marcus Lindblom wrote: > Dirk Reiners skrev: >> Hi Marcus, >> >> On Fri, 2006-08-18 at 16:50 +0200, Marcus Lindblom wrote:
[snip] >>> On reflection & class loading in general: >>> >> ... >>> Making OpenSG bindable to any script language and then making dynamic >>> stuff from such a language (python/java/xml/etc) is probably a better >>> way to get what we want. >>> >>> Making good script bindings to java is not easy either, as it is still a >>> statically compiled language (which is nice, since you get some support >>> by the compiler or the IDE (Eclipse)). >>> >>> Totally dynamic stuff (python) has it's place, but is not something that >>> I would imagine scales to big software.) Also, the more dynamic you make >>> things, the more performance you lose. >>> >>> My plan for our system is to have C++ in the bottom for performance >>> critical stuff, a java (or maybe python) binding for GUI stuff, >>> BeanShell/Groovy or more python for fully dynamic scripting, coupled >>> with some xml to set up scenes with all of our objects. Given a >>> java/python binding, everything else falls out quite nicely. >> Sounds like a good plan to me. I can't judge the importance of Java in >> this are very well, so I'm not sure how much pain I'd be willing to go >> through to get Java bindings (sounds like it would be a lot). > > > > Python on the other hand has great extensibility, and Allen has made big > > steps towards Python bindings. I don't know about Ruby and Lua, which > > seem to be used in hte game community quite a bit. > > I mainly chose Java because I have worked a lot with connecting it to > C++ and I know how to get stuff done. :) Also, our company has based > it's techonology on C++ and Java, > > Python, I do not know good enough. I've looked at the C-api for Python > and it looks abit messy, perhaps it's much easier when using > boost::python or similar tools. Boost.Python is the way to go. It abstracts the Python/C API very elegantly, but you still have access to it if you need it. > Also, is there something like a > Eclipse/Visual Studio-equivalent for Python on Windows? There is WingIDE. > How about my earlier comment on trying to make OpenSG swig friendly > (perhaps with the aid of some fcdEdit-processing). That would make many > ppl (at least me) happy and allow bindings to almost any language, > possibly boosting support even more? The biggest limitation of SWIG, IMHO, is that it does not allow cross-language extension. That is, given SWIG-generated Python bindings for a C++ library, you cannot derive a new Python class from a polymorphic C++ type and pass instances of the Python type back to the C++ side. SWIG is intended for allowing the use of a C or C++ API from many other languages, not for using *and* extending the C/C++ API. Boost.Python allows both, and its design also makes it very easy to embed the Python interpreter in C++ code. Now, I have heard that OpenSG 2.0 will not use polymorphism in various places where OpenSG 1.x does, so extending OpenSG from Python may not be a critical feature. Or it may be that extension in Python will happen in a different way than by deriving new types from C++ base types. If extension is not a goal, then SWIG would certainly provide much broader language coverage. > SWIG is pretty easy to use, especially if the core c++-code has been > simplified or modified so that binding is easy. (As swig parses > c++-files to make it's own functions, we could make simpler c++-classes > to serve as the script-versions of opensg-classes just for the purpose > of generating the proxy classes. The c++-backend would still compile to > the 'real' swig classes.) As far as code generation goes, there are two for Boost.Python: Pyste and pyplusplus. Both are based on GCC-XML at the lowest level. Allen is using pyplusplus for generating the PyOpenSG (or is it pyOpenSG?) code. -Patrick -- Patrick L. Hartling | VP Engineering, Infiscape Corp. PGP: http://tinyurl.com/2msw3 | http://www.infiscape.com/
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
