It’s not possible at all in X, unless you’re using one of the few
drivers that implement it.
As to retrace sync in windowed mode, there are basically two kinds of
implementation;
Double buffered "desktop"On Thursday 30 May 2002 20:13, Matthew Miller wrote:
On Thu, May 30, 2002 at 08:10:21PM +0200, David Olofson wrote:
(And of course, a proper video driver will “fix” the problem by
blocking on the retrace or “page available” event whenever you call
SDL_FlipSurface(). That is, depending on what platform you’re using,
you may never actually see this problem.)
Is this theoretically possible in windowed mode in X? My guess is
"no"…
Incredibly messy, unless there’s full hardware windowing support. (If the
windows are composed into a full display by the CRTC, there’s not really
a problem, as every window has it’s own VRAM pointer, which you can use
for pageflipping just as in fullscreen mode.) Without h/w support (ie on
pretty much any video card out there), the server has to deal with
multiple applications trying to do graphics in different ways, at
different frame rate at the same time, on the same screen.
“Explicit retrace sync”
Requires some way of performing blits in very tight sync with the raster.
(Much tighter than with pageflipping, as you need to make sure that
you’re not blitting where the raster beam is.) Very easy to do if the
video accelerator has a generic raster sync command - but it seems like
that’s not the case with most cards.
AFAIK, some cards have a command for “pageflie with retrace sync”. On
those, one could probably implement a fake “explicit retrace sync” by
performing a dummy flip to the same page. Other than that, it’s either
busywaiting on some port, or implementing something that tracks the video
timing by occasionally taking peeks at the retrace status. (The latter
requires real time scheduling accurate to within one video frame or
better to be of much use. You need that to actuall do something at the
right time - knowing exactly what “the right time” is isn’t enough.)
//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 -’