Re: [osg-users] Hints on Python wrappers (was osgPython (SWIG) 2.2.0)

2008-05-19 Thread Gerwin de Haan
Luigi, here's my delayed reply to OSG/Python wrapping:

Your questions:
1) opinions on which route to go for wrapping, (know there are wrappers
based on introspection, I' ve tried to use them but found few examples)
gAs a python user (and a bit maintainer) of osgswig I am biased towards the
swigged approach :-)  SWIG is mature and has many great documented features
that help transfer C++ (templated) functionality to several target
languages. The main drawback when swigging OSG is the use of nested classes,
which are not directly supported by swig and requires laborious
intervention. Yes, this is high maintenance but it seems to allow the
transfer of most OSG features and good tweaking for more target languages.
As far as python is concerned, a combined effort of ctypes, swig and OSG
introspection could make the OSG wrappings much better/faster, but the
taming of these beasts way out of my league.

2) In osgswig there is a working  example of a python pick handler that
subclass from osgGA.GUIEventHandler.
I would like  to subclass from osg.NodeVisitor without success.
Is this something doable in osgswig or in other wrappers?
g Using osgswig you can subclass in python from a C++ class, but you will
need to enable the directors swig feature for that class. For now, we only
enabled this for some classes only because it has quite a code overhead.

3) are there plans for supporting wrappers into core osg?
g see Robert's reply

4) is osg-users the right place to write for issues regarding script
language wrappers?
g I really wasn't paying that much attention to the OSG mailing list, but
now I've seen this I will in future. If you have really osgswig/python
specific questions you might want to contact osgswig developers (me,
megamillerzoid or hartmut directly) at this stage of development. Thanks for
the patches you have been sending.

In my daily work on prototyping VR interaction I use osgswig quite often
(from python), and I do work on the osgswig project a bit. I'm still
thinking of building a checklist, comparisons and examples to get osg
wrapping solutions coordinated for various languages. First, I plan to
extend especially on basic osg examples from python, so input and requests
are welcome.

regards,
Gerwin de Haan


On Thu, Apr 3, 2008 at 2:09 PM, Luigi Calori [EMAIL PROTECTED] wrote:

 Sorry, got no answer, so try to repost


 I' m interested in using OSG from Python or other scripted languages.
 After some  searching and testing I found osgswig and tried that path
 (still unsure which is the best script wrapper for OSG to use)

 Using osgswig I found some bugs and added some nodes that were missing.
 (posted to tehe main site at
 http://code.google.com/p/osgswig/issues/detail?id=5 )

 My questions:

 1) opinions on which route to go for wrapping, (know there are wrappers
 based on introspection, I' ve tried to use them but found few examples)
 2) In osgswig there is a working  example of a python pick handler that
 subclass from osgGA.GUIEventHandler.
 I would like  to subclass from osg.NodeVisitor without success.
 Is this something doable in osgswig or in other wrappers?
 3) are there plans for supporting wrappers into core osg?
 4) is osg-users the right place to write for issues regarding script
 language wrappers?


 Thanks in advance

 Luigi Calori



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Hints on Python wrappers (was osgPython (SWIG) 2.2.0)

2008-04-03 Thread Luigi Calori
Sorry, got no answer, so try to repost


I' m interested in using OSG from Python or other scripted languages.
After some  searching and testing I found osgswig and tried that path
(still unsure which is the best script wrapper for OSG to use)

Using osgswig I found some bugs and added some nodes that were missing.
(posted to tehe main site at 
http://code.google.com/p/osgswig/issues/detail?id=5 )

My questions:

1) opinions on which route to go for wrapping, (know there are wrappers
based on introspection, I' ve tried to use them but found few examples)
2) In osgswig there is a working  example of a python pick handler that
subclass from osgGA.GUIEventHandler.
I would like  to subclass from osg.NodeVisitor without success.
 Is this something doable in osgswig or in other wrappers?
3) are there plans for supporting wrappers into core osg?
4) is osg-users the right place to write for issues regarding script
language wrappers?


Thanks in advance

Luigi Calori



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Hints on Python wrappers (was osgPython (SWIG) 2.2.0)

2008-04-03 Thread Robert Osfield
Hi Luigi,

I am not an expert on the wrapper side so can't answer specifics.  My hope
was that the osgLua and osgPython projects would take off and become fully
featured and tested and then when ready migrate into the core OSG.  Alas so
far this hasn't happened.  osgLua and osgPython are based on
osgIntrospection and do wrapping dynamically - there are pros and cons in
doing this.

The other approach is to use swig and have swig interface files for the OSG,
this approach has also has pros and cons.  One of the big weakness for me is
high maintenance associated with interface files as each time the core OSG
changes the interfaces need to play catch up.

It might be possible to mix and match a solution, but being pretty
overstretched myself I can't really drive things along, once the community
coalesces around a workable system then I'd be happy to see it integrated
into the core OSG.

Robert.

On Thu, Apr 3, 2008 at 1:09 PM, Luigi Calori [EMAIL PROTECTED] wrote:

 Sorry, got no answer, so try to repost


 I' m interested in using OSG from Python or other scripted languages.
 After some  searching and testing I found osgswig and tried that path
 (still unsure which is the best script wrapper for OSG to use)

 Using osgswig I found some bugs and added some nodes that were missing.
 (posted to tehe main site at
 http://code.google.com/p/osgswig/issues/detail?id=5 )

 My questions:

 1) opinions on which route to go for wrapping, (know there are wrappers
 based on introspection, I' ve tried to use them but found few examples)
 2) In osgswig there is a working  example of a python pick handler that
 subclass from osgGA.GUIEventHandler.
 I would like  to subclass from osg.NodeVisitor without success.
 Is this something doable in osgswig or in other wrappers?
 3) are there plans for supporting wrappers into core osg?
 4) is osg-users the right place to write for issues regarding script
 language wrappers?


 Thanks in advance

 Luigi Calori



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org