Re: [linux-audio-dev] FLTK/X11 question

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] FLTK/X11 question
From: Frank Neumann (Frank.Neumann_AT_st.com)
Date: Wed Sep 25 2002 - 18:16:23 EEST


Hi,
Steve wrote:

> I'm hacking together a VU meter app for jack, using FLTK, and it works OK,
> except that when the update rate falls out of sync with the video refresh
> rate the window flickers. I'm pasting a bigass image as the background,
> see screenshot http://inanna.ecs.soton.ac.uk/~swh/vu-ss.png (apologies
> for the tacky brushed steel background, its a placholder, honest).
>
> 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 am not sure how exactly you are doing this, but my first guess would
be to ask if you are rendering into an off-screen pixmap (until
everything in there is finished) and then do one quick Blt() to bring
this to your on-screen window. That should at least keep the flickering
low.

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".

Hope that helps,
Frank

-- 
      Frank Neumann (Frank.Neumann_AT_st.com), VIONA Development Center
            STMicroelectronics, Karlstraße 27, 76133 Karlsruhe
_______________________________________________
linux-audio-dev mailing list
linux-audio-dev_AT_music.columbia.edu
http://music.columbia.edu/mailman/listinfo/linux-audio-dev


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Sep 25 2002 - 18:37:17 EEST