Horde3D

Next-Generation Graphics Engine
It is currently 28.11.2024, 06:49

All times are UTC + 1 hour




Post new topic Reply to topic  [ 75 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Python wrapper
PostPosted: 27.04.2008, 18:03 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
I've written a Python wrapper to allow some fast experimenting with Horde3D.
The included sample depends on pyglet 1.0.

Some functions of Horde3DUtils are not wrapped: freeMem, initOpenGL, releaseOpenGL, swapBuffers, createTGAImage.
AFAIK freeMem is only needed for createTGAImage. Creating Images should be easier with PIL which is often included with Python. The OpenGL functions are not needed since pyglet provides this functionality.

Update 2010/03/03
Updated for community svn r386.

Update: 2009/06/28
Added patch by Leon Oostrijk. Wrapper now works for community svn trunk again.

Update: 2009/02/05
Added support for sound extension.

Update: 2009/02/04
Replaced the Python bindings with pure Python bindings - no compilation / binaries are needed with these. See community svn r191: http://mm-werkstatt.informatik.uni-augsburg.de/public/Horde3D/trunk/Horde3D/Bindings/Python/


Update: 2008/10/26
community svn trunk now features doc strings for horde3d.py

Update: 2008/10/16
Added Python bindings to community svn. These will not work with Beta 2!

Update: 2008/10/15
Updated bindings to work with svn trunk (r63) / Beta 2. Maybe some new functions missing, but basic.py works.

Update: 2008/06/06
Updated Bindings to work with svn trunk (r30).

Update 2008/04/30:
Added windows binaries for r3. They run with wine, I hope under Windows, too.
URL: http://server2.noeding.net/horde3d.zip


Update 2008/04/29:
Added simple application framework for rapid prototyping
Added sample application for terrain extension and


Update 2008/04/28:
Added r2 of Python wrapper with support for terrain extension. Until I figure out how to enable / disable the terrain extension using distutils it will be enabled by default. To disable it just uncomment a line inside setup.py.






Community svn users: please use the svn version and not the files attached here!


Attachments:
File comment: Horde3D Bindings for Python: r6
(svn trunk r63 / Beta 2)

pyhorde3d_beta2-r2.zip [16.56 KiB]
Downloaded 1591 times
File comment: Horde3D Bindings for Python: r4
(svn trunk r30)

horde3d-python-r4.zip [14.27 KiB]
Downloaded 1499 times
File comment: Horde3D Bindings for Python: r3
horde3d-python-r3.zip [15.93 KiB]
Downloaded 1494 times


Last edited by Codepoet on 03.03.2010, 18:07, edited 13 times in total.
Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 27.04.2008, 21:46 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
ugh...reminds me that I need to finish my squirrel bindings.

Nice work. Checking it out now.


Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 28.04.2008, 22:22 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Update: r2, see initial post


Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 28.04.2008, 22:46 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
This should make a really nice setup. I was using pyglet directly before stumbling across Horde, and the combination should be somewhere approaching prototype-nirvana :)

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 28.04.2008, 22:54 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
I'm currently writing a small container App to reduce boilerplate code for my next tests / examples. Terrain is already working very nice :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 29.04.2008, 07:50 
Offline

Joined: 26.03.2008, 02:58
Posts: 160
very cool. i have to start using this.


Last edited by DDd on 29.04.2008, 18:43, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 29.04.2008, 17:13 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Update: r3


Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 30.04.2008, 00:57 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
On the path to madness aka Windows: I've hacked Horde3D and the makefiles so that I can cross compile Horde3D for windows from Linux complete with Python wrappers. I still have to test it on a "real" windows machine but wine is happy when rendering the terrain sample using Python 2.5.2 :mrgreen:

Code is available from my gitweb inside the mingw32 branch. I'll publish the binaries after I got some sleep, it's getting somewhat late here... I'll explain what I've done then, too.


Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 30.04.2008, 12:12 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Added link to windows binaries.


Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 06.06.2008, 17:17 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
updated bindings for svn trunk


Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 07.10.2008, 13:56 
Offline

Joined: 06.10.2008, 19:05
Posts: 3
Hello (again :D),

I have done some work on the Python binding to get it compile, but the samples wouldn't work (Segfaulting in Horde3D::initOpenGLExtensions). However, that's the patch; maybe it's useful for someone: http://paste.pocoo.org/show/87306/

Or, do you maybe have any idea how to get the samples working? :)

Cheers,

Fred


Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 07.10.2008, 15:10 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Thanks for the patch.

I don't have access to my development computer until next week, then I'll try to update the bindings to beta 2 and fix the samples.


Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 15.10.2008, 16:51 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Updated bindings. Please report any problems to me.


Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 21.10.2008, 18:06 
Offline

Joined: 06.10.2008, 19:05
Posts: 3
Hello,

unfortunately, it's still segfaulting for me. Output:
Quote:
fred@gnom:~/downloads/Python/tests$ python basic.py --content ~/downloads/Horde3D_SDK_1.0.0_Beta2/Horde3D/Binaries/Content/
terrain not available
primitives not available
Segmentation fault


Backtrace:
Code:
...
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
terrain not available
primitives not available

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7e098c0 (LWP 6994)]
0xa53ebe7c in initOpenGLExtensions () from /usr/local/lib/libHorde3D.so
Current language:  auto; currently asm
(gdb) bt
#0  0xa53ebe7c in initOpenGLExtensions () from /usr/local/lib/libHorde3D.so
#1  0xa53bce67 in RendererBase::init () from /usr/local/lib/libHorde3D.so
#2  0xa53c5553 in Renderer::init () from /usr/local/lib/libHorde3D.so
#3  0xa5398d1e in init () from /usr/local/lib/libHorde3D.so
#4  0xa54364aa in horde3d_init (self=0x0, args=0xb7dc902c)
    at horde3d/horde3d.cpp:61
#5  0x080c9993 in PyEval_EvalFrameEx ()
#6  0x080c95c5 in PyEval_EvalFrameEx ()
#7  0x080c95c5 in PyEval_EvalFrameEx ()
#8  0x080c95c5 in PyEval_EvalFrameEx ()
#9  0x080cb0d7 in PyEval_EvalCodeEx ()
#10 0x080cb227 in PyEval_EvalCode ()
#11 0x080ea6d8 in PyRun_FileExFlags ()
#12 0x080ea979 in PyRun_SimpleFileExFlags ()
#13 0x08059335 in Py_Main ()
#14 0x080587f2 in main ()


I am running Ubuntu Hardy Heron.

Fred


Top
 Profile  
Reply with quote  
 Post subject: Re: Python wrapper
PostPosted: 21.10.2008, 18:13 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Hmm, I probably missed some fixes I did for the community svn version. I'll post an update later today / tomorrow.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 75 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group