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

Re: Grabbing the pointer with OpenGL



Mads Bondo Dydensborg wrote:
> 
> 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.

Hmmm - I wonder if that could be a part of your problem.

Try it in the render callback.

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

If you are truly intending to stick with software rendering, I wouldn't spend
too much time on view frustum culling. Probably 90% or more of your CPU time is
going into filling pixels - and hence any effort spent on optimising the rest of
the code can at most get you a few percent frame rate increase.

Instead, look into techniques like portal culling that reduce the number of
pixels that you draw that are actually only going to be tossed out by Z-buffer
culling.

Personally, I think it's time to dump software rendering.  You can pick up
really amazing 3D hardware for virtually nothing these days.  One small hit
on your credit card and you have a 50x speedup.


-- 
Steve Baker   HomeEmail: <sjbaker1@airmail.net>
              WorkEmail: <sjbaker@link.com>
              HomePage : http://web2.airmail.net/sjbaker1
              Projects : http://plib.sourceforge.net
                         http://tuxaqfh.sourceforge.net
                         http://tuxkart.sourceforge.net
                         http://prettypoly.sourceforge.net
                         http://freeglut.sourceforge.net



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