|
Typically, I've been implementing double buffering
as follows:
1) The onscreen buffer is a drawing area
widget.
2) The offscreen buffer is a pixmap.
3) Drawing occurs to the offscreen
pixmap.
4) On expose, the offscreen pixmap is copied into
the onscreen drawing area.
I believe that is how Eric Harlow presents it in
his book as well.
Now, in my case, every drawing is different. I
never need to reuse them. I know that DirectWhatever has operations for swapping
these buffers directly, thus saving the copy operation. I would like to do the
same.
That is, I want to just swap in the offscreen
buffer for the onscreen buffer. I want to save the copy operation, because I do
not need to preserve either buffer.
How can I do that? Is it possible? Can it be done
without flicker? Please offer suggestions, or reasons why it cannot be
done.
--
SEGV
|