This is a discussion on Re: Flicker free animation with Xlib - how? - Xwindows ; Boltar wrote: > Hi > > I will soon be writing a graphics application that will require > flicker free graphics using Xlib. In the past I have tried the > old draw - undraw method but that can produce ...
> I will soon be writing a graphics application that will require
> flicker free graphics using Xlib. In the past I have tried the
> old draw - undraw method but that can produce nasty flicker. I have also
> tried using the double buffer dbe extension but it seems just too
> slow for large windows. I have also tried viewing the code of
> xlock which seems to manage without using dbe but I've yet to figure
> out how it does it (the code frankly is just too complex). Can anyone
> suggest a way to do it?
> Thanks in advance
The DBE extension (or any similar handcrafted method, like drawing into
a Pixmap then blitzing it to the window) can only be fast if your
display gives some hardware assist; eg Pixmaps in the video memory
instead of the system RAM.
A video board with OpenGL support is likely to provide fast
double-buffering (but IIRC in 12-bits color only).
If your display has large colormaps, you could draw into *half* of the
planes of the window, then change the colormap (or switch it if more
than 1 colormap is supported).
To summarize: I dont think you can achieve animation in a way that
guarantees both 'flicker free' and portability.
Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
Tel : +32 2 790.29.41