I'm working on a Python wrapper for OIS http://sourceforge.net/projects/wgois
I have a working prototype and I would love to get your feedback on it.
It has a drop-in replacement for SampleFramework.py and seems to work just fine.
Here is a Python23 module, if you need a Python24 module you will have to build it yourself from the oisaddons/python CVS module at the above mentioned URL.
That's really nice. After working with the ogre event system I'm about fed up with dealing with it. Do you mind if I include your SampleFramework (with modifications) in pyogre?
Does this system allow for event callbacks? Such as something.onKeyDown(...)?
Of course, you are welcome to include it.
There is a callback system that I implemented after reading a post here by you. There is essentially one class that handles the delegation of events to registered Python functions. No directors.
Here is a small sample:
print 'Mouse X: %d' % arg.state.absX
print 'Mouse Y: %d' % arg.state.absY
def onMousePressed(arg, id):
print 'Mouse pressed: %d' % id
# A window handle must be aquired, but is skipped for this demonstration
inputSystem = ois.InputManager.createInputSystem(params)
mouse = inputSystem.createInputObject(ois.OISMouse, True)
You should look at wxTest.py to see how it works.
Also I had to create an int* wrapper to be able to call RenderWindow.getCustomAttribute
hadle = ois.IntPtr()
hwnd = handle.value()
I didn't notice the getCustomAttribute in RenderTarget. I'll add this to my todo list.
I haven't had a chance to look at it in some time, but I have been planning to update it and integrate it better with PyOgre.
OK thanks for the feedback.