[linux-audio-dev] FLTK/X11 question

Tim Goetze tim at quitte.de
Wed Sep 25 16:12:31 UTC 2002

Frank Neumann wrote:

>> I seem to remeber that on the Amiga and in GL I could issue a call to wait
>> for the next vertical blank, forcing the redraw to be in sync with the
>> video hardware. Is there an equivalent in FLTK or X?
>> How do other people get round this?

i'd look at the GL kernel support sites, they might have a patch that
creates some sort of a '/dev/retrace', or add it to GLX. with vanilla
linux/X there's no way to do this except busy-wait reading inb
(0x3da) afaik. 

but you certainly don't want to do this.

>I am not sure if there are still ways to wait for vertical retrace
>nowadays, but even if there are, I imagine it would not make sense,
>given the overhead/latency the X protocol will put between the beginning
>of the VBL and your attempt to draw things onto the screen "right at
>that moment".

you can't draw whenever you want to anyway because jackd and fellows
need to run 'before' the gui unless stalling the audio processing is
ok or the frag size is large enough (and the gui well-mannered).


More information about the Linux-audio-dev mailing list