Horde3D
http://horde3d.org/forums/

Python wrapper
http://horde3d.org/forums/viewtopic.php?f=1&t=313
Page 1 of 5

Author:  Codepoet [ 27.04.2008, 18:03 ]
Post subject:  Python wrapper

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

Author:  AcidFaucet [ 27.04.2008, 21:46 ]
Post subject:  Re: Python wrapper

ugh...reminds me that I need to finish my squirrel bindings.

Nice work. Checking it out now.

Author:  Codepoet [ 28.04.2008, 22:22 ]
Post subject:  Re: Python wrapper

Update: r2, see initial post

Author:  swiftcoder [ 28.04.2008, 22:46 ]
Post subject:  Re: Python wrapper

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 :)

Author:  Codepoet [ 28.04.2008, 22:54 ]
Post subject:  Re: Python wrapper

I'm currently writing a small container App to reduce boilerplate code for my next tests / examples. Terrain is already working very nice :)

Author:  DDd [ 29.04.2008, 07:50 ]
Post subject:  Re: Python wrapper

very cool. i have to start using this.

Author:  Codepoet [ 29.04.2008, 17:13 ]
Post subject:  Re: Python wrapper

Update: r3

Author:  Codepoet [ 30.04.2008, 00:57 ]
Post subject:  Re: Python wrapper

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.

Author:  Codepoet [ 30.04.2008, 12:12 ]
Post subject:  Re: Python wrapper

Added link to windows binaries.

Author:  Codepoet [ 06.06.2008, 17:17 ]
Post subject:  Re: Python wrapper

updated bindings for svn trunk

Author:  xho5 [ 07.10.2008, 13:56 ]
Post subject:  Re: Python wrapper

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

Author:  Codepoet [ 07.10.2008, 15:10 ]
Post subject:  Re: Python wrapper

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.

Author:  Codepoet [ 15.10.2008, 16:51 ]
Post subject:  Re: Python wrapper

Updated bindings. Please report any problems to me.

Author:  xho5 [ 21.10.2008, 18:06 ]
Post subject:  Re: Python wrapper

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

Author:  Codepoet [ 21.10.2008, 18:13 ]
Post subject:  Re: Python wrapper

Hmm, I probably missed some fixes I did for the community svn version. I'll post an update later today / tomorrow.

Page 1 of 5 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/