On Wed, Sep 25, 2002 at 05:16:23 +0200, 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?
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.
No, I'm just draw()ing the bitmap to the widget, then using line draw to
draw on the pointer. I dont think FLTK supports blits or offscreen drawing
- at least I couldn't find any mention of it.
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".
Thats very true. Thanks. Maybe I should be using something like SDL,
rather than FLTK.
- Steve