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 ([EMAIL PROTECTED]), VIONA Development Center STMicroelectronics, Karlstra�e 27, 76133 Karlsruhe _______________________________________________ linux-audio-dev mailing list [EMAIL PROTECTED] http://music.columbia.edu/mailman/listinfo/linux-audio-dev
