Input in Mogre (OgreInput, DirectInput)
I have some questions about Input in Mogre:
(1) How can I access OgreInput in Mogre?
(2) What is the reason why the ExampleApplication uses DirectInput?
(3) Are there any disadvantes of OgreInput?
Thx & greets
You can't access ogre input in mogre, because it is not implemented.
OgreInput is for the testing and examples in Ogre. Search in the main forums, sindbad (the main ogre developer) posted many times about it. I think he will drop it sometime out of ogre.
Mogre uses an axiom module for its ExampleApplication. I think bekas used this code because it is pure c# and axiom is some kind of ogre in pure c#. I think the axiom project is rewriting the whole ogre in c#.
If you use windows.forms to window your code, you can use the forms input instead of Ogre's. It works very well. Something to the effect of this:
Form win = ...;
win.KeyDown += new KeyEventHandler(win_KeyDown);
win.KeyUp += new KeyEventHandler(win_KeyUp);
win.MouseDown += new MouseEventHandler(win_MouseDown);
win.MouseUp += new MouseEventHandler(win_MouseUp);
As rosenkro pointed out, input doesn't belong in Ogre and it will be removed in favour of OIS
There's not much point in using OgreInput instead of MDX, SDL.NET or other input for .NET libraries.
Plus, I didn't look much into it but OgreInput seems a bit inefficient. I was getting better framerates at Mogre's SkeletalAnimation demo instead of the native one.
OIS port perhaps? I'd be happy to use any other c# libs but which ones support wheels/forcefeedback? I'm using OIS in c++ at the moment and it's fairly easy to get them working.
If an OIS port is worth doing I'd wait until the api settles at v1.0 btw (which is soon btw as ogre 1.4 needs it finalised)
which ones support wheels/forcefeedback?
AFAIK managed DirectInput supports them; I'm not sure about SDL.NET
In case anyone cares, I have used the windows mouse hook function to filter the mouse input to my handler before passing it on to the rest of the system.
Works pretty well, but you have to be careful that you don't react to mouse input when you don't have focus (like a dialog box up).