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

Re: Grabbing the pointer with OpenGL

On Wed, 11 Apr 2001, Steve Baker wrote:

> > I warp the pointer in the glut callback function. (And sets a flag to
> > avoid endless loops - is there a smarter way to avoid this?)
> The glut *render* callback - right?

No, actually in the callbacks from glutPassiveMotionFunc and
glutMotionFunc. I choose this, to try an keep the mouse at the center. 

> If you do it in the mouse, timer or (worst of all) idle callback - then
> that could be a problem.

I think I solved it by using flags and heuristics, but maybe I should do
it in the render callback instead.

> > If you use glutWarpPointer, I guess I can too. ;-)
> Well - maybe not at such slow frame rates...I generally assume a minimum of
> ~20Hz and a 640x480 window - if you are down to (say) 4Hz and a 320x240 window
> on a 1600x1200 desktop...

It was a bit higher than I wrote (which was 800x600). It runs at about
10Hz in 640x480 .The mouse "blinks" outside the window often.

But this is software rendering. And, I do not cull to the viewfrustrum (I
read all your faqs, btw ;-) yet.

Mads Bondo Dydensborg.                               madsdyd@challenge.dk
Faced with the prospect of rereading this book, I would rather have my brains
ripped out by a plastic fork
                 - Charles Cooper, ZD net, in review of B@TSOT by Bill Gates.

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