Page 1 of 1

Python bindings for 1.10

Posted: Tue May 17, 2016 2:16 pm
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

Re: Python bindings for 1.10

Posted: Fri May 20, 2016 10:51 am
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!