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

Best method for mouse input



Hi guys,

Simple issue, I would have thought, but something which has given me a 
bit of pain today - what's the best method for getting Mouse events 
under X? This is primarily for a camera control class that I'm working 
on. Works under Win32, but XFree86 is proving somewhat more troublesome.

I ask becuase I've been trying a few methods and none seen completely 
ideal. To wit:

- Using straight X events and calls. Problem is XWarpPointer lags 
horribly. It works, but you get long delays if you move the mouse around 
a lot as you generate tonnes of X events.

- Using DGA. Unfortunately I've been unable to find any useful 
documentation on DGA, but my tinkering suggests that you can only init 
the DGA extensions in full screen mode. Unfortunately I want to use 
Window modes, as well as full screen.

- SDL. All good and well, but frankly I'm not really in the mood to deal 
with SDLs backward incompatibility.

Obviously I'm missing something crucial here, but I'm starting not to 
see the woods for the trees. It's somewhat embarrassing that I'm stumped 
by this one - mouse input _should_ be simple. One can muck around with 
OpenGL/OpenAL, 3D math, network programming and so on and so forth for 
years and still get stuck on the simpliest of things :)

It just seems as if there is no 100% correct and perfect way to do mouse 
  input under X. Anybody care to enlighten me further?

Simon.
-- 
------------------------------
email(n) - the current trend in modern postism.