Hi all,
I'm using Ogre 1.8.x with OIS to use input (mouse.)
For debugging, I'm not testing in full screen.
When the mouse is already being use in OGRE and I have a break point, I no longer have the mouse for windows unless I stop the program. I use the keyboard only to be able to move around when this happens...
Have you run into this?
Thanks
[SOLVED] Debugging Ogre when using OIS and mouse.
-
- Gnome
- Posts: 379
- Joined: Fri Sep 16, 2011 4:54 pm
- x 10
[SOLVED] Debugging Ogre when using OIS and mouse.
Last edited by iblues1976 on Thu Mar 20, 2014 4:49 pm, edited 1 time in total.
- Klaim
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
- Contact:
Re: Debugging Ogre when using OIS and mouse.
I think you hit the problem with acquiring the mouse in exclusive mode. See the OIS configuration in your code, change the mouse to non exclusive.
Here is how I do this (using a variable telling me if I should use an exclusive or non exclusive mouse):
Here is how I do this (using a variable telling me if I should use an exclusive or non exclusive mouse):
Code: Select all
OIS::ParamList paramlist;
#if UCX_PLATFORM == UCX_PLATFORM_WINDOWS
paramlist.emplace( "w32_mouse", "DISCL_FOREGROUND" );
if( exclusive_mouse )
paramlist.emplace( "w32_mouse", "DISCL_EXCLUSIVE");
else
paramlist.emplace( "w32_mouse", "DISCL_NONEXCLUSIVE");
paramlist.emplace( "w32_keyboard", "DISCL_FOREGROUND");
paramlist.emplace( "w32_keyboard", "DISCL_NONEXCLUSIVE");
paramlist.emplace( "w32_keyboard", "DISCL_NOWINKEY");
-
- Gnome
- Posts: 379
- Joined: Fri Sep 16, 2011 4:54 pm
- x 10
Re: Debugging Ogre when using OIS and mouse.
Thank you... this works great!
-
- Gnome
- Posts: 379
- Joined: Fri Sep 16, 2011 4:54 pm
- x 10
Re: [SOLVED] Debugging Ogre when using OIS and mouse.
Do you know a quick way to completely disabled the mouse?
For example, I may not want the mouse to be active at all, but I already have all the code for the events and all... I just want (sometimes) to OIS have the mouse at all? Can I use a parameter as well?
Thanks
For example, I may not want the mouse to be active at all, but I already have all the code for the events and all... I just want (sometimes) to OIS have the mouse at all? Can I use a parameter as well?
Thanks
- Klaim
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
- Contact:
Re: [SOLVED] Debugging Ogre when using OIS and mouse.
I'm not sure what you mean by "disable the mouse". You could force the mouse to not be displayed for example, but that requires a platform-specific call (or GUI-specific call for linux).
If you want the mouse to not be usable at all you can just not build a mouse object using OIS but still configure OIS to have exclusive mouse. That means that if your app get the focus, there will be no mouse at all (not even outside the window).
If you want the mouse to not be usable at all you can just not build a mouse object using OIS but still configure OIS to have exclusive mouse. That means that if your app get the focus, there will be no mouse at all (not even outside the window).
-
- Gnome
- Posts: 379
- Joined: Fri Sep 16, 2011 4:54 pm
- x 10
Re: [SOLVED] Debugging Ogre when using OIS and mouse.
you are right
it was a brain fart that I had for a second.
I guess what I could do is not show the ois mouse icon
if anything...
it was a brain fart that I had for a second.
I guess what I could do is not show the ois mouse icon
if anything...