views:

62

answers:

1
+1  Q: 

C++ input question

Hello!

I am attempting to build a small local-purpose 3d engine, which has to be platform-independent and right now I'm looking for a way to handle different possible types of user input.

This, obviously, includes mouse / keyboard events and possibly, another analogue controllers (joysticks, for example). I can think of several ways to implement this and am seeking for an advice - what would be better.

So far, I can write my own controller event handling and dispatching module, reimplement the whole functionality myself, though I guess I would face some troubles making this work for different platforms and integrating it. That's the hardest and the reinventing way.

Another approach would mean reusing some existing scheme / library for this sort of things, but I can't come with a good choice. Qt seems like an overkill for my small library, allegro and other SDL-like libraries have pretty tight logic coupling and writing a generic wrapper around them could become even harder then rewriting everything from scratch.

Maybe there is some appropriate library, which could help me in this situation?

What would you do?

Thank you.

+1  A: 

OIS is pretty good. It's the default one that the OGRE tutorials use.

PigBen