1

I want to pin my mouse in middle of screen I mean when user move mouse the only thing that he see is rotation in environment also mouse cursor never reach window border ...

I want to handle my camera with mouse but when mouse reach window border or in full screen mode screen border the mouse position doesn't change but camera should still rotate slow or speedy depend on speed of mouse movement...

How should I solve this problem?

genpfault
  • 51,148
  • 11
  • 85
  • 139
pooya
  • 901
  • 2
  • 15
  • 29
  • 3
    Not with OpenGL. OpenGL only deals with getting things drawn. Input handling is specific to the used windowing/event/operating system. – datenwolf Feb 12 '11 at 17:30
  • I try GLUT ...is there any way to handle this? – pooya Feb 12 '11 at 19:52
  • 2
    GLUT can't do this. But GLUT is neither part of OpenGL nor are you forced to use GLUT. I recommend using a different framework. For example GLFW has support for hiding the mouse cursor and will then report relative movements which can be used for tasks like yours. – datenwolf Feb 12 '11 at 20:27

1 Answers1

0

SDL_warpmouse can accomplish this. If you are looking for an OS-specific way to accomplish this, consider viewing SDL's source code.

TheBuzzSaw
  • 8,648
  • 5
  • 39
  • 58