How do I wait for vertical retrace?

Chuck Robey chuckr at chuckr.org
Tue May 6 09:53:50 PDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Carsten Haitzler (The Rasterman) wrote:
> On Tue, 6 May 2008 18:43:52 +0200 Nicolas George
> <nicolas.george at normalesup.org> babbled:
> 
>> L'octidi 18 floréal, an CCXVI, Johan Walles a écrit :
>>> I don't care about vertical retrace in itself, waiting for vertical
>>> retrace would only be a way for me to achieve flicker-free animation
>>> in a 2D application.
>> DOUBLE-BUFFER is no good for that: when used for continuous animation (such
>> as video), it causes exactly as much tearing as a simple bitmap copy. At
>> least it was true in November 2006.
> 
> it's been pretty much true as long as i have done anything with x (since about
> 1995...). i have yet to see is not tear...
> 

Well, I guess the Xorg command to swap buffers, while it certainly does
accomplish an immediate changing of any or all of the data in your screen
buffers, it also does automatically do retrace sync.  You'd want to change your
sits quite quickly as one requirements, but you'd want the data to be swapper
NOT in the middle of writing a screen, no matter how fast it can happen.  You
don't have to worry about syncing, OpenGL does that for you without your direct
involvement.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIII0ez62J6PPcoOkRAq4FAJ9BZz2uNrLqBfw2XQ97VloQLVVKUwCeP95t
Z5L4u4f4l7A3C0S0dx/gCEM=
=17D2
-----END PGP SIGNATURE-----



More information about the xorg mailing list