Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: randy@erik.UUCP (Randy Brown) Newsgroups: comp.windows.x Subject: Re: XPutImage Message-ID: <9103211635.AA09366@erik.uucp> Date: 21 Mar 91 16:35:34 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 31 From: uunet!quisp.philips.com!bob (Robert A. Cohen) Message-Id: <118960@philabs.Philips.Com> Is there a faster way to display sequences than using XPutImage() in a loop? If you have enough room in the server to create pixmaps (off-screen drawables), you can then copy them to the screen with XCopyArea, which is usually much faster than XPutImage. If your server supports the shared memory extension MIT-SHM (use xdpyinfo to find out) you can allocate pixmaps in client memory and share them with the server, allowing both client and server to draw quickly into the pixmap, with rapid display via a call to XCopyArea and no actual transmission of the image through the client-server connection. There is also a double-buffering and amimation extension that I don't know anything about--I offer this only as an exercise for the ambitious reader. One advantage is that timing is done in the server, which is presumably no less precise than timing in the client, and doesn't get changed by variations in the connection delay. Sequences each image of which require only a few of many available colors can be displayed by overlaying them in various planes of a single window and changing colormaps to display specific planes, with "don`t care" values for the other planes. Changing colormaps is fast on most servers.