[SDL] ANNC: smoothscroll

Kisai kisai_z at yahoo.com
Wed Mar 27 13:38:00 PST 2002


There is a similar problem on Windows, on two different machines running
two different video cards. 

On both machines (a PIII with a Rage 128 32MB and an Athlon with a
Radeon 7500 64MB DDR) with the inlines, it appears that every 1 second
it skips back a frame. Without the inlines it just has a bit of a
shimmer effect. Disabling the console window (building for subsystem
windows) reduces the occurrences of frame jumping. However enabling
Vsync doesn't appear to change anything.

> -----Original Message-----
> From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org] On Behalf Of
David
> Olofson
> Sent: Wednesday, March 27, 2002 11:57 AM
> To: sdl at libsdl.org
> Subject: Re: [SDL] ANNC: smoothscroll
> 
> On Wednesday 27 March 2002 19:23, Bob Pendleton wrote:
> > Downloaded it, ran it. For the most part, it is smooth, but every
few
> > seconds it seems to go backwards and then forwards again.
> 
> *Backwards*? :-) If you look at the code, you'll probably find that
time
> as returned by SDL_GetTicks() must go backwards for that to happen.
This
> is all code involved in this:
> 
> 		tick2 = SDL_GetTicks();
> 		dt = (tick2 - tick1) * 0.001f;
> 		tick1 = tick2;
> 
> 	and
> 
> 		xpos += dt * sx;
> 		ypos += dt * sy;
> 
> 
> Sounds more like what it *looks* like when one or more frames are
dropped
> occasionally. (This is rather likely to happen every now and then, if
the
> nVidia driver tries to implement retrace sync with
busy-waiting/polling.)
> 
> 
> > Very
> > distracting.
> 
> I bet. (Guess why I'm bitching about triple buffering, proper drivers
and
> stuff all the time...)
> 
> 
> > I'm using a NVIdia TNT2 board with the NVidia OpenGL drivers on a
> > 500MHz K6-2 256MB, RH 7.2 with all patches, and SDL 1.2.3
> 
> Are you running with retrace sync enabled? If so, try disabling it.
(Most
> attempts to do retrace sync on Linux I have seen so far are more or
less
> broken, and will only eliminate tearing at the cost of entirely
dropping
> frames every now and then.)
> 
> If that's not it, the problem is probably some background job stealing
> the CPU occasionally. Doesn't happen normally on any of my systems,
but
> it *does* happen when there's too much going on in the background.
> 
> 
> //David Olofson --- Programmer, Reologica Instruments AB
> 
> .- M A I A -------------------------------------------------.
> |      Multimedia Application Integration Architecture      |
> | A Free/Open Source Plugin API for Professional Multimedia |
> `----------------------------> http://www.linuxdj.com/maia -'
> .- David Olofson -------------------------------------------.
> | Audio Hacker - Open Source Advocate - Singer - Songwriter |
> `-------------------------------------> http://olofson.net -'
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





More information about the SDL mailing list