Python bindings for 1.10

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Python bindings for 1.10

Post by paroj »

I have created SWIG based python bindings for the default (1.10) branch. The work took some inspiration by the ruby-ogre project.

This is what currently works:
https://github.com/OGRECave/ogre/blob/m ... /sample.py

Currently the iterator APIs are broken, as the way they are implemented in Ogre is rather exotic.

The plan is to complete the bindings and to extend it to other languages like C# - eventually obsoleting Mogre and friends.

Personally, I am not too interested in C# - but if you are, I created a skeleton implementation as a starting point here:
https://github.com/OGRECave/ogre/pull/192
User avatar
only_a_ptr
Halfling
Posts: 62
Joined: Sun Apr 26, 2009 8:43 pm
x 2

Re: Python bindings for 1.10

Post by only_a_ptr »

Python bindings directly as OGRE component? This looks very promising! I'm maintaining one tool based on PyOGRE, currently running on antique OGRE 1.7.1 binaries. PyOGRE doesn't seem completely abandoned, so I tried building it, but I didn't get too far. This seems a lot more workable solution.

It appears SWIG is more capable than I thought. I knew it parses C++ headers directly, but IIRC it required some special cleanups. Here it seems you just #included everything, added a couple tweaks, and it just works: https://github.com/OGRECave/ogre/commit ... 42069d8d1c

Keep up the good work!
Rigs of Rods is alive and kicking!
Post Reply