Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!dogie.macc.wisc.edu!decwrl!chico.pa.dec.com!klee From: klee@chico.pa.dec.com (Ken Lee) Newsgroups: comp.windows.x Subject: Re: X double buffering Keywords: double buffering Message-ID: <1929@bacchus.dec.com> Date: 16 Oct 89 18:19:45 GMT References: <170@med.Stanford.EDU> <181@wbcs.UUCP> Sender: news@decwrl.dec.com Reply-To: klee@decwrl.dec.com Distribution: usa Organization: DEC Western Software Laboratory Lines: 20 In article <170@med.Stanford.EDU>, rick@hanauma.stanford.edu (Richard Ottolini) writes: > In article <181@wbcs.UUCP> doug@wbcs.UUCP (Doug Kratky) writes: > >Could someone give me hints, code fragments, or examples > >on "double-buffering" with X? > > Draw into an offscreen pixmap, then copy it onto screen. This isn't really "double buffering". Double buffering avoids the copy by writing to 2 different planes (or groups of planes) of a multi-plane display, then fiddling with the colormap to determine which planes show. The advantage of this approach is that, on most systems, changing the colormap is much faster than copying pixmaps. As I mentioned earlier, some of the X11R3 demo programs, such as ico, implement double buffering. Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@decwrl.dec.com uucp: uunet!decwrl!klee