Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Pages: 1 [2]

Author Topic: Hardware OS Cursor  (Read 4399 times)

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Hardware OS Cursor
« Reply #15 on: August 16, 2006, 07:37:23 AM »

What is your OIS startup code?

If if you want to have the mouse visiable, you need to set the nonexlucisve flag, and most likely you should also set the foreground or background flag.

Not sure what you r issue is with the latest source in cvs, likely you are trying to reference the removed singleton stuff.
Logged

Freak 99

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 4
    • View Profile
Hardware OS Cursor
« Reply #16 on: August 16, 2006, 11:33:30 AM »

Thx for your reply.

I have enabled both the nonexlucisve and foreground flag:
Code: [Select]
// changed lines in ExampleFrameListener.h
...
#if defined OIS_WIN32_PLATFORM
  win->getCustomAttribute("HWND", &windowHnd);
  pl.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_NONEXCLUSIVE")));
  pl.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_FOREGROUND")));
#elif defined OIS_LINUX_PLATFORM
...



All code that connects with OIS is 100% copied from your OIS Ogre example, with only those two startup lines added.  The files copied are ExampleApplication.h / GuiFrameListener.h, plus the ExampleFrameListener class from gui.cpp.

I am pretty much helpless with this problem, because i really didn't change anything in those example classes :?

I am using buffered mouse input, btw. does that make a difference?
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Hardware OS Cursor
« Reply #17 on: August 16, 2006, 11:36:55 AM »

If you have OIS .7.2 source distro. Can you modify the console app ( I cannot remember if it shows the mouse or not atm) so that it shows the mouse? and then see what it is reporting.

Oh, and in your Ogre app, you are using startRendering() (should be if your sing the exact example framework).
Logged

Freak 99

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 4
    • View Profile
Hardware OS Cursor
« Reply #18 on: August 16, 2006, 11:45:39 AM »

Quote from: "pjcast"
If you have OIS .7.2 source distro. Can you modify the console app ( I cannot remember if it shows the mouse or not atm) so that it shows the mouse? and then see what it is reporting.

The console app shows the mouse by default, and it gives mouse positions between 0,0 and 100,100 inside the window.

Quote from: "pjcast"
Oh, and in your Ogre app, you are using startRendering() (should be if your sing the exact example framework).


mRoot->startRendering() is called inside the go() function of ExampleApplication.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Hardware OS Cursor
« Reply #19 on: August 16, 2006, 01:04:56 PM »

Hmm, if the console demo is return valid numbers, i don't see why you would be getting strange numbers.

What version of Ogre, do you set the clipping values of the MouseState? Are you deviating from the example code at all? How do you get your window handle?
Logged

Freak 99

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 4
    • View Profile
Hardware OS Cursor
« Reply #20 on: August 19, 2006, 12:22:25 AM »

Thank you a lot for your help.

I ended up reinstalling my DirectX SDK, Ogre SDK, OIS and CEGUI. Now it works, although i didn't change my own source files. Strange.

But your help wasn't for nothing, since i learned a lot about OIS and Ogre by investigating and following your hints  :wink:

Thanks a lot again  :mrgreen:
Logged
Pages: 1 [2]