[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Sync with vertical refresh does not work(?)



Matthias Treder wrote:
Updating the screen with
directx and doublebuf is an all-or-nothing thing it seems.

Sounds like directx is doing buffer swapping.

There are two ways that double buffering can be done.
If it's done by copying the back buffer to the front
buffer, you can get away with not fully clearing the
back buffer and only copying the areas that have
changed.

But if it's done by exchanging the front and back
buffers (which is very cheap to do in hardware)
you have to clear the buffer and start over for
each frame, otherwise you get leftover stuff from
two frames ago.

--
Greg