Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!adobe!asente From: asente@adobe.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: fast, flicker-free animation, how? Message-ID: <7898@adobe.UUCP> Date: 1 Nov 90 23:31:48 GMT References: <16223@hydra.gatech.EDU> Sender: news@adobe.COM Organization: Adobe Systems Inc. Lines: 24 In article <16223@hydra.gatech.EDU> robert@shangri-la.gatech.edu (Robert Viduya) writes: >I'm working on a program that animates some simple geometric entities and >displays them in a window... >Drawing the entities doesn't take any significant >time but getting X to display them quickly seems to be a big stumbling block. >I've tried three different methods: > > Draw into an offscreen pixmap and then use XCopyArea to put it > into the window. This is the slowest and I get about 4 frames > per second. It does, however, produce no annoying flicker. How big is your image? Unless your X implementation is extremely bad, you should be able to do much better than 4 frames per second this way for "moderate" sized windows (say, 400x400). I have an application that essentially bounces around a 100x100 object within a 400x400 window, and I get about 72 frames per second on a DECstation 5000, using Display PostScript to do the imaging into the pixmap. You have to be a little bit clever and set the clipping region not to update parts of the window you're not changing. I can update an animation where the entire 400x400 window is changing at about 36 frames per second. -paul asente asente@adobe.com ...decwrl!adobe!asente