Hi everyone,
I'm new here (and in the world Ogre3d and OIS) and I hurt a little trouble.
So, my application is coding with Ogre3D and I use OIS to manage the mouse and keyboard input, mouse allows me to rotate the camera (with the right-click) and keyboard to move in my map.
My game needs a 2D interface (a GUI so), I naturally chose CEGUI (supported by Ogre3D).
My worry is this:
I have 2 framelisteners, one manages the event for the map itself and the other manages the event on the GUI: click on a button, text field.
The problem is that I can not initialize the 2nd framelistener ... I tried creating 2 inputmanager but it has not rained in OIS ... So I took one InputManager and I use to manage my map and the GUI. I wanted to create a keyboard and a mouse buffered and others unbuffered. Except that once again I have a problem, I have this error:
terminate called after throwing an instance of 'OIS::Exception'
what(): No devices match requested type.
Abandon
Hmm, ok ...
I wanted to know if anyone had this problem?
This is my code :
bool bufferedKeys = false;
bool bufferedMouse = false;
bool bufferedJoy = false;
inputManager_ = OIS::InputManager::createInputSystem (pl);
OIS::Keyboard* keyboard = static_cast<OIS::Keyboard*>(inputManager_->createInputObject( OIS::OISKeyboard, true));
OIS::Mouse* mouse = static_cast<OIS::Mouse*>(inputManager_->createInputObject( OIS::OISMouse, true));
keyboard_ = static_cast<OIS::Keyboard*> (inputManager_->createInputObject (OIS::OISKeyboard, bufferedKeys));
if (!bufferedKeys)
keyboard_->setEventCallback (this);
mouse_ = static_cast<OIS::Mouse*> (inputManager_->createInputObject (OIS::OISMouse, bufferedMouse));
if (!bufferedMouse)
mouse_->setEventCallback (this);
It works if I remove keyboard and mouse (and leave keyboard_ and mouse_)
Thank you in advance for your help:)