[comp.windows.x.motif] How do I double buffer in X?

icsrb@caesar.cs.montana.edu (Ray Babcock) (05/12/91)

Does anyone know a method to do double buffering with X, Xt, or Motif?
I have a drawing area in which I want to animate some graphics and am
getting a flicker due to refresh interactions.  

babcock@cs.montana.edu Ray S. Babcock, Adjunct Assistant Professor
Computer Science Department, 410 Roberts Hall
Montana State University, Bozeman, MT  59717 (406) 994-4780
--
babcock@cs.montana.edu Ray S. Babcock, Adjunct Assistant Professor
Computer Science Department, 410 Roberts Hall
Montana State University, Bozeman, MT  59717 (406) 994-4780

victor@devorah.tcs.com (Victor Elkind) (05/14/91)

I can suggest creating a pixmap the size of your window, "drawing" into
that pixmap, and then using XCopyArea to copy the pixmap into the window.
This should eliminate flashing that takes place when you draw directly into
a window.  Of couse, I cannot guarantee how well this will work for animation,
but it's worth a try.  Let me know if this works for you or if you find
a better way.

----
Victor Elkind, Software Engineer      | victor@tcs.com or uunet!tcs!victor

The opinions expressed above are my own...