Hello Robert and Peter,
Robert Osfield wrote:
On 1/18/07, Peter Gebauer <[EMAIL PROTECTED]> wrote:
Have you thought about using Pyste (Boost) or any other code-generator
that
can parse the OSG sources and produce proper Python binding code?
Like I said to you before, I could help you with the python-dev and
binding
generators to make a complete Python binding for OSG that retains all
nifty
Python functionality.
All the wrappers are auto-generated from the C++ sources and these
wrappers are supplied with the OSG, including the CVS version. To keep
them up to date all one has to run is run Marco Jez's genwrapper tool
and they are updated, and these means osgPython and osgLua or any
other introspection based tools get all the latest features without
need for any separate binding being generated.
So rather consider yet another attempt at using a 3rd party language
specific wrapper tool, consider the practicalities of supporting long
term and what power the native introspection can provide, both now and
in the future.
Introspection is very powerful, but even for languages that provide good
capabilities in this area, like java or c#, nobody is building wrappers
that use introspection AT RUNTIME. This adds a huge overhead, which is
not attractive as directly wrapping low-level code in a language like
Python already adds a layer for native<->Python data conversion,
delegation of method calls, etc. which impacts performance. A more
sensable approach in my opinion is to use osgIntrospection to generate
wrapper code in a way that tools like SWIG do it. This kind of code
directly wraps C++ classes and tries to keep the overhead to a minimum.
No introspection calls would have to be done at runtime, the
capabilities would simply be used to generate code.
But, what would the advantage of osgIntrospection then be over options
like SWIG (which can parse OSG's headers) or Boost.Python+Pyste (or
Py++)? The main point I see is (indeed) low maintenance, but I suspect
the performance hit to reduce the real usability of those bindings.
Paul
PS I the past 6 months I have created (yet another) set of Python
bindings. These are made with SWIG. I've used them a lot for all sorts
of tools I needed for my job, mostly automated model creation,
prototyping of algorithms, interactively testing certain parts of the
OSG. I'm switching jobs in the really near future and probably won't be
able to do much with OSG anymore. I'm still pondering what to do with
the bindings.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
--
Paul Melis
VR Specialist,
Center for High-Performance Computing & Visualization,
University of Groningen,
The Netherlands
T: +31 50 363 9298
E: [EMAIL PROTECTED]
W: http://www.rug.nl/rc/hpcv/index
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/