home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / graphics / 13079 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.8 KB

  1. Path: sparky!uunet!topaz.bds.com!topaz.bds.com!ron
  2. From: ron@topaz.bds.com (Ron Natalie)
  3. Newsgroups: comp.graphics
  4. Subject: Re: How to make *shared-memory* Pixmaps on Sun 4?
  5. Date: 20 Dec 1992 16:22:54 GMT
  6. Organization: BDS Systems
  7. Lines: 24
  8. Distribution: world
  9. Message-ID: <1h26kuINN784@topaz.bds.com>
  10. References: <9212171848.aa16515@Paris.ics.uci.edu> <tp3c8bg@zuni.esd.sgi.com> <RBERLIN.92Dec18225118@birdland.Eng.Sun.COM>
  11. NNTP-Posting-Host: topaz.bds.com
  12.  
  13. You have to be careful.  There are two facilities provided by the
  14. MIT-SHM extension.  The first is XShmPutImage.  This essentially does
  15. the XPutImage call from the shared memory region by copying to the
  16. destination drawable.  The other is a real Shared Memory pixmap that
  17. makes an X Drawable out of a piece of shared memory.
  18.  
  19. The former is implemented entirely in the extension.  No ddx code is used.
  20. Hence, all you have to do is -DMITSHM when you compile and you get it.
  21. The turning of shared memory into a PIXMAP requires colusion with other
  22. DDX code regarding Pixmap allocation.  This is not easy to do in all cases.
  23. I spent some time doing this with the HP server which uses a separate module
  24. called GRM to manage all the server memory and had to teach it how to allow
  25. X to pass in a chunk of memory allocated outside of GRM to use as server
  26. memory.
  27.  
  28. The distinction between the two is pretty minor.  If you are solely after
  29. better bandwidth to the screen, XShmPutImage is OK.  If you want to do
  30. fancier stuff like drawing into pixmaps outside of X or peeking into them
  31. with out doing a GetImage, then you'll need to make sure that the server
  32. supports that.  The test program in extensions/test/shmtest.c will tell
  33. you.  If it comes up with only one window, it doesn't have the shared pixmap
  34. part of the extension in the server in use.
  35.  
  36. -Ron
  37.