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
Python bindings for 1.10
-
- OGRE Team Member
- Posts: 2141
- Joined: Sun Mar 30, 2014 2:51 pm
- x 1151
-
- Halfling
- Posts: 65
- Joined: Sun Apr 26, 2009 8:43 pm
- x 3
Re: Python bindings for 1.10
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!
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!