Re: [osg-users] ANN: osgSWIG/Py available

2009-01-14 Thread Phan, Linh H
Hi,

  I'm trying to run the gtkoswidget.py example in python IDLE 1.2.1 and I got 
stuck at gtk:

 import sys
 import pygtk
 pygtk.require('2.0')
 import gtk

Traceback (most recent call last):
  File pyshell#3, line 1, in module
import gtk
  File C:\Python25\lib\site-packages\gtk-2.0\gtk\__init__.py, line 38, in 
module
import gobject as _gobject
  File C:\Python25\lib\site-packages\gtk-2.0\gobject\__init__.py, line 30, in 
module
from _gobject import *
ImportError: DLL load failed: The specified module could not be found.

Can someone tell me how I can fix this or where I can get a working gtk version?

Thank you,

Linh

-Original Message-
Dear OSG Community,

first of all a late Happy New Year! The osgSWIG team is happy to announce 
osgSWIG/Py 0.9.1 for Python 2.6 which corresponds to the OpenSceneGraph 2.6.1 
version. There is an installer for Win32/Python 2.6 or if you feel funky you 
can try to compile osgSWIG/Py straight from the source.

Please note that on Windows we can only support you with Python 2.6 - hence 
build with Visual Studio 2008. And another note, we decided to only support 
stable releases, like 2.6.x or the upcoming 2.8.x releases as the maintenance 
of the interface files becomes more problematic. Be assured we are looking into 
some alternative ways to generate them :)

For those users looking for an update of the version including osgART 
(http://www.osgart.org) - please be patient, we are working on the release of 
osgART 2.x and would like to keep things in sync - there will be an update but 
not right now.

Please give the installer a spin - let us know of your problems in the issue 
tracker.

Now, head over to http://code.google.com/p/osgswig/

Cheers,

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


Re: [osg-users] How to define my own geometry in osgswig?

2008-11-17 Thread Phan, Linh H
Hi Gerwin,

  it would be nice if this feature would work since if I have
legacy c++ code that draws an asteroid, for instance, I would like to
be able to just wrap that c++ code up in python and use it in osgswig.  I
tried putting

%feature(director) osg::Geometry;

in osg.i, and I got alot of errors:

cd /C/cygwin-1.7/usr/local/src/buildosgswig/src/python  /c/MinGW/bin/g++.exe  
  -D_osg_EXPORTS -g -I/c/Program Files/OpenSceneGraph2.4/include 
-I/C/cygwin-1.7/home/phan/projs/osgswig-read-only/include -I/c/Python25/include 
  -o CMakeFiles/_osg.dir/osgPYTHON_wrap.obj -c 
/C/cygwin-1.7/usr/local/src/buildosgswig/src/python/osgPYTHON_wrap.cxx
In file included from 
c:/cygwin-1.7/usr/local/src/buildosgswig/src/python/osgPYTHON_wrap.cxx:6679:
C:/cygwin-1.7/usr/local/src/buildosgswig/src/python/osgPYTHON_wrap.h:104: 
error: `PrimitiveFunctor' has not been declared
C:/cygwin-1.7/usr/local/src/buildosgswig/src/python/osgPYTHON_wrap.h:104: 
error: ISO C++ forbids declaration of `arg0' with no type
C:/cygwin-1.7/usr/local/src/buildosgswig/src/python/osgPYTHON_wrap.h:105: 
error: ISO C++ forbids declaration of `pf' with no type
C:/cygwin-1.7/usr/local/src/buildosgswig/src/python/osgPYTHON_wrap.h:106: 
error: `PrimitiveIndexFunctor' has not been declared
C:/cygwin-1.7/usr/local/src/buildosgswig/src/python/osgPYTHON_wrap.h:106: 
error: `virtual bool SwigDirector_Geometry::supports(int) const' and `virtual 
bool SwigDirector_Geometry::supports(int) const' cannot be overloaded
C:/cygwin-1.7/usr/local/src/buildosgswig/src/python/osgPYTHON_wrap.h:107: 
error: `virtual void SwigDirector_Geometry::accept(int) const' and `virtual 
void SwigDirector_Geometry::accept(int) const' cannot be overloaded
c:/cygwin-1.7/usr/local/src/buildosgswig/src/python/osgPYTHON_wrap.cxx:7569: 
error: `bool SwigDirector_Geometry::supports' is not a static member of `class 
SwigDirector_Geometry'
...

Thank you Gerwin,

Linh

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gerwin de Haan
Sent: Monday, November 17, 2008 12:17 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] How to define my own geometry in osgswig?

Linh,
Currently in osgswig you cannot directly override osg.Drawables in the
target scripting language.
This is partly because we have not enabled SWIG directors for this
class, which are responsible for such cross-language inheritance.
Also, Drawables are pure virtual/abstract which doesn't play nice with
our directors. As an alternative, you might want to try and enable
Directors for Geometry in osg.i:
%feature(director) osg::Geometry;
I'll consider this a feature request, will try this and see what the
consequences on performance are.
See the pyramid.py example for defining your own geometry without subclassing.
Gerwin


On Mon, Nov 17, 2008 at 8:43 AM, Phan, Linh H [EMAIL PROTECTED] wrote:
 Hi,

   I was wondering if it's possible to draw my own geometry in osgswig, eg
 something like:

 import osg, osgViewer
 class MyCube(osg.Drawable):
 def __init__(self):
 osg.Drawable.__init__(self);   # AttributeError: No constructor
 defined
 def drawImplementation(self, state):
 # draw some geometry
 glutWireCube (1.0)
 def computeBound(self):
 bbox = osg.BoundingBox()
 bbox.set(-2,-2,-2,2,2,2)
 return bbox

 geode = osg.Geode()
 geode.addDrawable(MyCube())
 viewer = osgViewer.Viewer()
 viewer.setSceneData(geode)
 viewer.run()

 I get AttributeError: No constructor defined when I run it.  Is there a
 way to draw my own geometry?

 Thank you,

 Linh

 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to define my own geometry in osgswig?

2008-11-16 Thread Phan, Linh H
Hi,

  I was wondering if it's possible to draw my own geometry in osgswig, eg 
something like:

import osg, osgViewer
class MyCube(osg.Drawable):
def __init__(self):
osg.Drawable.__init__(self);   # AttributeError: No constructor defined
def drawImplementation(self, state):
# draw some geometry
glutWireCube (1.0)
def computeBound(self):
bbox = osg.BoundingBox()
bbox.set(-2,-2,-2,2,2,2)
return bbox

geode = osg.Geode()
geode.addDrawable(MyCube())
viewer = osgViewer.Viewer()
viewer.setSceneData(geode)
viewer.run()

I get AttributeError: No constructor defined when I run it.  Is there a way 
to draw my own geometry?

Thank you,

Linh

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


Re: [osg-users] osgswig binary release?

2008-11-15 Thread Phan, Linh H
Hi Gerwin,

  osgviewer cow.osg works for me.  I did have OSG_FILE_PATH
set and I also tried to used absolute path to the cow.osg but it
for some reason it just couldn't find the mingw_osgdb_osg.dll and 
mingw_osgdb_rgb.dll files I think.
The osgviewer could find those files ok (I could see it in gdb osgviewer).  I 
copy those osgdb_osg.dll and
osgdb_rgb.dll (and all the osgPlugins dll) to many places and and tried setting 
OSG_LIBRARY_PATH etc but
still osgswig couldn't find the plugin.

Thanks Gerwin,
Linh

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gerwin de Haan
Sent: Saturday, November 15, 2008 3:47 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgswig binary release?

Linh,
Make sure your OSG_FILE_PATH environment variable is set correctly to a 
location where cow.osg can be found (e.g. a directory where you extracted the 
OpenSceneGraph-Data file). You must be able to run the regular osgviewer with 
this file as well (osgviewer cow.osg).
Gerwin
On Fri, Nov 14, 2008 at 11:50 PM, Phan, Linh H [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:
Hi Luigi,

 thanks for your osg.zip!  However, whenever I run pickosg.py :

[EMAIL PROTECTED] ~...examples/python]$ ./pickosg.py
Warning: Could not find plugin to read objects from file cow.osg.

It seems that this line:

loadedModel = osgDB.readNodeFile(cow.osg)

always return None.  I then explicitly include the osgPlugins-2.6.0 directory 
in pickosg.py via:

#!c:/Python25/python.exe
import sys;
sys.path.append('c:\\cygwin-1.7\\usr\\local\\src\\osg\\osgPlugins-2.6.0');

but it still could not find plugin.  Do you know what I'm doing wrong?

Thank you Luigi,

Linh

-Original Message-
From: [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] [mailto:[EMAIL 
PROTECTED]mailto:[EMAIL PROTECTED]] On Behalf Of Luigi Calori
Sent: Friday, November 14, 2008 3:12 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgswig binary release?

Here
http://virtualrome.googlecode.com/svn/trunk/py_code/py25_apps/PyPackages/osg.zip

you can find an osgSwig (from some month ago, with some patches) I has
been built with Visual Stusio 7.1 against OSG 2.5 (included with the zip)
It has been tested with python 2.5 win32 binary, you can test by adding
the folder where you extract the zip to the PYTHONPATH env variable

I'm  trying to build osgSwig svn with OSG 2.6 (Viual Studio
compiler)buth there is a still unsolved problem, reported in
http://code.google.com/p/osgswig/issues/detail?id=12#c3
due to substitution of std::vector with osg::MixinVectors   (this low
level change prevents wrapper access to functions for building arrays)
I also had to make some changes to build as reported in
http://code.google.com/p/osgswig/issues/detail?id=13

If interested, let me know

Luigi


Phan, Linh H ha scritto:
 Hi,

   I'm having a real hard time compiling osgswig (gotten from osgswig
 svn) for OpenSceneGraph 2.3.4 on Windows using MinGW or cygwin.  The
 README said that it has been tested with OpenSceneGraph 2.3.4.http://2.3.4. 
  Does
 anyone have a pre-built Windows binary for osgswig that they can make
 available?  I would really appreciate it.

 Thank you,

 Linh


 

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


___
osg-users mailing list
osg-users@lists.openscenegraph.orgmailto:osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.orgmailto: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


Re: [osg-users] osgswig binary release?

2008-11-14 Thread Phan, Linh H
Hi Luigi,

  thanks for your osg.zip!  However, whenever I run pickosg.py :

[EMAIL PROTECTED] ~...examples/python]$ ./pickosg.py
Warning: Could not find plugin to read objects from file cow.osg.

It seems that this line:

loadedModel = osgDB.readNodeFile(cow.osg)

always return None.  I then explicitly include the osgPlugins-2.6.0 directory 
in pickosg.py via:

#!c:/Python25/python.exe
import sys;
sys.path.append('c:\\cygwin-1.7\\usr\\local\\src\\osg\\osgPlugins-2.6.0');

but it still could not find plugin.  Do you know what I'm doing wrong?

Thank you Luigi,

Linh

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Luigi Calori
Sent: Friday, November 14, 2008 3:12 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgswig binary release?

Here
http://virtualrome.googlecode.com/svn/trunk/py_code/py25_apps/PyPackages/osg.zip

you can find an osgSwig (from some month ago, with some patches) I has
been built with Visual Stusio 7.1 against OSG 2.5 (included with the zip)
It has been tested with python 2.5 win32 binary, you can test by adding
the folder where you extract the zip to the PYTHONPATH env variable

I'm  trying to build osgSwig svn with OSG 2.6 (Viual Studio
compiler)buth there is a still unsolved problem, reported in
http://code.google.com/p/osgswig/issues/detail?id=12#c3
due to substitution of std::vector with osg::MixinVectors   (this low
level change prevents wrapper access to functions for building arrays)
I also had to make some changes to build as reported in
http://code.google.com/p/osgswig/issues/detail?id=13

If interested, let me know

Luigi


Phan, Linh H ha scritto:
 Hi,

   I'm having a real hard time compiling osgswig (gotten from osgswig
 svn) for OpenSceneGraph 2.3.4 on Windows using MinGW or cygwin.  The
 README said that it has been tested with OpenSceneGraph 2.3.4.  Does
 anyone have a pre-built Windows binary for osgswig that they can make
 available?  I would really appreciate it.

 Thank you,

 Linh


 

 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgswig binary release?

2008-11-14 Thread Phan, Linh H
Hi Gerwin,

  I finally got the osgswig svn compiled with osg 2.4 using MinGW but I can't
seem to import the resulting DLLs (eg _osg.pyd) with python 2.5 win32 binary:

 import sys; 
 sys.path.append('c:\\cygwin-1.7\\usr\\local\\src\\buildosgswig\\lib\\python')
 import osg
Traceback (most recent call last):
  File pyshell#3, line 1, in module
import osg
  File /usr/local/src/buildosgswig/lib/python/osg.py, line 7, in module
import _osg
ImportError: DLL load failed: The specified module could not be found.

But the _osg.pyd is in the python sys.path:
[EMAIL PROTECTED] ...src/osg]$ cygcheck 
c:/cygwin-1.7/usr/local/src/buildosgswig/lib/python/_osg.pyd
C:\cygwin-1.7\usr\local\src\buildosgswig\lib\python\_osg.pyd
  C:\WINDOWS\system32\KERNEL32.dll
C:\WINDOWS\system32\ntdll.dll
  C:\WINDOWS\system32\msvcrt.dll
  C:\WINDOWS\system32\OPENGL32.DLL
C:\WINDOWS\system32\ADVAPI32.dll
  C:\WINDOWS\system32\RPCRT4.dll
C:\WINDOWS\system32\Secur32.dll
C:\WINDOWS\system32\GDI32.dll
  C:\WINDOWS\system32\USER32.dll
C:\WINDOWS\system32\GLU32.dll
C:\WINDOWS\system32\DDRAW.dll
  C:\WINDOWS\system32\DCIMAN32.dll
  C:\e\cg\osg\buildosg\lib\libOpenThreads.dll
  C:\e\cg\osg\buildosg\lib\libosg.dll
  C:\WINDOWS\system32\python25.dll
C:\WINDOWS\system32\SHELL32.dll
  C:\WINDOWS\system32\SHLWAPI.dll
C:\cygwin-1.7\usr\local\src\osg\MSVCR71.dll

I can compile a simple hello world python extension using
the MinGW g++ compiler and loaded into the python 2.5 win32 binary but
I don't know why it's not working for the osgswig extensions.

Thank you Gerwin,

Linh
PS  I also posted the problem on the osgswig google code site.


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gerwin de Haan
Sent: Thursday, November 13, 2008 11:48 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgswig binary release?

Dear Linh,

I'm not sure the osgswig svn still builds on and is tested on osg 2.3.4 (even 
when using more mainstream linux compilers or MS visual studio). I personally 
am still stuck on osg 2.4 (linux), other report that osg 2.6 and up works ok 
with some known limtiations. We as osgswig contributors have not yet put clear 
mechanisms in place to keep up with the various osg versions. Please post the 
versions, error messages and other details of your findings on the osgswig 
google code site, so we might be able to assist you.

regards,
Gerwin
On Fri, Nov 14, 2008 at 2:11 AM, Phan, Linh H [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:
Hi,

  I'm having a real hard time compiling osgswig (gotten from osgswig svn) for 
OpenSceneGraph 2.3.4 on Windows using MinGW or cygwin.  The README said that it 
has been tested with OpenSceneGraph 2.3.4.http://2.3.4.  Does anyone have a 
pre-built Windows binary for osgswig that they can make available?  I would 
really appreciate it.

Thank you,

Linh



___
osg-users mailing list
osg-users@lists.openscenegraph.orgmailto: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] osgswig binary release?

2008-11-13 Thread Phan, Linh H
Hi,

  I'm having a real hard time compiling osgswig (gotten from osgswig svn) for 
OpenSceneGraph 2.3.4 on Windows using MinGW or cygwin.  The README said that it 
has been tested with OpenSceneGraph 2.3.4.  Does anyone have a pre-built 
Windows binary for osgswig that they can make available?  I would really 
appreciate it.

Thank you,

Linh


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