Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!bu-cs!madd From: madd@bu-cs.BU.EDU (Jim Frost) Newsgroups: comp.windows.x Subject: Re: X double buffering Message-ID: <40616@bu-cs.BU.EDU> Date: 17 Oct 89 16:02:41 GMT References: <181@wbcs.UUCP> <170@med.Stanford.EDU> Reply-To: madd@cs.bu.edu (Jim Frost) Followup-To: comp.windows.x Distribution: usa Organization: Software Tool & Die Lines: 29 In article <170@med.Stanford.EDU> rick@hanauma.UUCP (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 works well on a fast X-server such as a DEC 3100 and not so well |on a slow server such as any Sun. Actually it works pretty well even on the 386i server (the SLOOOW server), especially if compiled with gcc. When working for my previous employer we used this method to make graphics changes seem atomic to the user; the copies were fast enough to be generally unnoticable, especially if the copy is limited to the changed area. We were using a fullscreen window for our display and it still worked well. On fast servers it works extremely well, although you're not going to get real-time animation out of it as you can with true double-buffering (our application worked much better under SGI GL with or without double buffering than under X, imagine that :-). |(Not all drawing operations that work on screens work on pixmaps such |as erase.) True, but it's simple enough to fill a rectangle to take care of this case. jim frost software tool & die madd@std.com