[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Grabbing the pointer with OpenGL

Hi There

I am in the process of writing a game, that needs to control a viewpoint
with the mouse, much in the same way Quake does.

The solution I have devised, uses glutWarpPointer to make the mouse stay
in the center of the window, then glutPassiveMotionFunc to get the
events. This works, controlwise, but quite often the mouse escapes my
window for a brief moment, then returns. Which is annoying. 

So, what do you guys use?

I have looked at XGrabPointer, but I ran away scared by the man page. And
it is not very portable either, I guess. 

I would like to stay with OpenGL and glut if at all possible - these are
the only libraries my game depends on at the moment.



Mads Bondo Dydensborg.                               madsdyd@challenge.dk
Ignore cries of wasted bandwidth! This is pure drivel that will always be
posted by the anti-troll lobby. These jerks fail to understand that trolls
are the best way to drive people off the internet thus making available
multi-mbs for the rest of us to download our porn.

  - The Subtle Art of Trolling  (http://www.altairiv.demon.co.uk/troll/)

To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.dk
For additional commands, e-mail: linuxgames-help@sunsite.dk