*BSD News Article 28339


Return to BSD News archive

Xref: sserve comp.os.386bsd.apps:1015 comp.os.linux.misc:10777
Newsgroups: comp.os.386bsd.apps,comp.os.linux.misc
Path: sserve!newshost.anu.edu.au!munnari.oz.au!foxhound.dsto.gov.au!fang.dsto.gov.au!yoyo.aarnet.edu.au!news.adelaide.edu.au!news.cs.su.oz.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!usc!cs.utexas.edu!uunet!rosevax!camax01!johnsone
From: johnsone@camax.com (Eric Johnson)
Subject: Re: DOOM for X
Message-ID: <1994Mar12.171410.25578@camax.com>
Date: Sat, 12 Mar 1994 17:14:10 GMT
References: <2lm9ih$6s5@godot.cc.duq.edu> <glen.763349922@paladine> 	<markus.57.00E736E9@rsvl.unisys.com> <hastyCMJL20.Mr4@netcom.com> <RICH.94Mar12032626@id.tmc.edu>
Organization: CAMAX Systems, Inc.
Lines: 44

>The next binary release of XFree86 for FreeBSD will support memory
>mapping the entire frame buffer in user space (the MITSHM extension).

I'm not an expert on FreeBSD, but I believe the MIT-SHM extension just 
provides for client applications and the X server to share memory for 
XImage and (optionally) X Pixmap data structures. This sharing is 
done via UNIX System V shared memory functions, such as shmget(). 
The performance savings you achieve is that you no longer have to 
transmit huge amounts of image data between client and X server. 
Instead, your application asks the X server to display an image or 
pixmap from a shared-memory segment. The X server must still 
handle the task of placing the image on the screen.

One good thing about the MIT-SHM extension is that if your system
offers the SYSV shared-memory functions, the client code is highly
portable between systems (one of the great benefits of X, which
partially makes up for its failings).

In addition, if you're animating, you might want to look into
the multi-buffering extension to X, which allows you to implement
techniques such as double-buffering. (If this extension is not
available, you can also use colormap planes for double-buffering,
at a considerable cost in the number of available colors.)

For more on these extensions and topics, as well as some example programs,
see the thick-enough-to-stun-an-ox Professional Graphics Programming
in the X Window System by Johnson (yours truly) and Reichard, MIS: Press,
1993, ISBN 1-55828-255-6. Chapter 22 covers MIT-SHM and chapter 25
covers the double-buffering with colormap planes and the multi-buffer 
extension.

Hope this helps,
-Eric


Eric F. Johnson      email: johnsone@camax.com  That's the problem with science.
CAMAX Systems, Inc.  phone: +1 612 854 5300     You have a bunch of empiricists
7851 Metro Parkway   fax:   +1 612 854 6644     trying to describe things of
Minneapolis, MN 55425 USA                       unimaginable wonder. -Calvin 
-- 
Eric F. Johnson      email: johnsone@camax.com  That's the problem with science.
CAMAX Systems, Inc.  phone: +1 612 854 5300     You have a bunch of empiricists
7851 Metro Parkway   fax:   +1 612 854 6644     trying to describe things of
Minneapolis, MN 55425 USA                       unimaginable wonder. -Calvin