Input in Mogre (OgreInput, DirectInput)

Gamok

29-10-2006 19:17:27

Hi!

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
- Gamok

rosenkro

29-10-2006 21:22:50

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#.

Roland

Clay

30-10-2006 01:48:14

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);

Bekas

30-10-2006 06:52:42

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.

Vectrex

30-10-2006 14:05:00

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)

Bekas

31-10-2006 00:09:57

which ones support wheels/forcefeedback?
AFAIK managed DirectInput supports them; I'm not sure about SDL.NET

madmark

03-11-2006 15:06:44

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).