home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / graphics / pex-faq < prev    next >
Encoding:
Internet Message Format  |  1996-12-02  |  52.4 KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!apollo.hp.com!lf.hp.com!news.dtc.hp.com!col.hp.com!fc.hp.com!kws
  2. From: kws@fc.hp.com (Karl Schultz)
  3. Newsgroups: comp.graphics.api.pexlib,comp.answers,news.answers
  4. Subject: comp.graphics.api.pexlib - Welcome! (FAQ) (30nov95)
  5. Followup-To: comp.graphics.api.pexlib
  6. Date: 1 Dec 1996 12:00:03 GMT
  7. Organization: Hewlett-Packard Fort Collins Site
  8. Lines: 1278
  9. Approved: news-answers-request@MIT.EDU
  10. Distribution: world
  11. Message-ID: <57rs03$i66@fcnews.fc.hp.com>
  12. Reply-To: kws@fc.hp.com
  13. NNTP-Posting-Host: manfred.fc.hp.com
  14. Summary: Frequently asked questions about PEX
  15. Keywords: PEX, FAQ
  16. Frequency: monthly
  17. X-Rcs-Header: $Header: pex.faq,v 1.7 95/11/30 18:49:06 kws Exp $
  18. Xref: senator-bedfellow.mit.edu comp.graphics.api.pexlib:611 comp.answers:22820 news.answers:88380
  19.  
  20. Archive-name: graphics/pex-faq
  21. Last-Modified: 30 November 1995
  22.  
  23. This article discusses frequently asked questions (FAQs) about PEX.
  24.  
  25. Each question is grouped as an article in a digest.  Some news 
  26. readers (i.e rn) have commands for skipping to the next article 
  27. in a digest.  In rn, ^G (control-G) skips to the next article in a digest.  
  28.  
  29. The information in this article is culled from several sources: 
  30. - the FAQ in comp.windows.x
  31. - articles in the newsgroups comp.windows.x and comp.graphics
  32. - articles from the retired newsgroup comp.windows.x.pex
  33. - articles from the replacement newsgroup comp.graphics.api.pexlib
  34.  
  35. Where possible, the author, date and article id of the original
  36. newsgroup article is included.  When I have edited/modified the
  37. original article, I have enclosed my modifications in square brackets
  38. [] with my initials (RT or KS) at the end.  Rich Thomson was the
  39. previous owner of the FAQ.  Karl Schultz is the current owner.
  40.  
  41. Contents:
  42.   1)  What's new?
  43.   2)  What is PEX?
  44.   3)  How can I tell if my X server supports PEX?
  45.   4)  Why don't the R5 PEX demos work on my mono screen?
  46.   5)  Where can I get an X-based PEX package?
  47.   6)  What about immediate mode for PEX?
  48.   7)  Why don't the R5 PEX contributed demos compile?
  49.   8)  Why doesn't double-buffering work via phigs_ws_type_create?
  50.   9)  What does "Kernel not configured with shared-memory IPC" mean?
  51.  10)  Obtaining Graphics Standards (GKS, PHIGS, etc.)
  52.  11)  PHIGS/PEX Books
  53.  12)  Articles on PEX
  54.  13)  PEX Application Programmer Interfaces (APIs)
  55.  14)  PHIGS Toolkit -- a portable toolkit for PHIGS programmers
  56.  15)  Why doesn't HLHSR mode (Z buffering) work with the PEX-SI?
  57.  16)  printing from PEX
  58.  17)  Porting from PEX-SI PHIGS to PEXlib
  59.  18)  Using PHIGS with PEX servers w/o the Workstation Subset
  60.  19)  OReilly's Program! (BadMatch error in first.c)
  61.  
  62. Acronyms:
  63.  
  64. ANSI        American National Standards Institute
  65. API        Application Programmer Interface
  66. CGM        Computer Graphics Metafile
  67. GKS        Graphics Kernel System
  68. HLHSR        Hidden line and hidden surface removal
  69. ISO        International Organization for Standardization
  70. PEX        PHIGS/PHIGS-PLUS Extensions to X (obsolete)
  71. PHIGS        Progammer's Hierarchical Interactive Graphics System
  72. PHIGS-PLUS    PHIGS Plus Lumiere Und Surfaces
  73. R5        X Window System, Version 11 Release 5
  74. R6        X Window System, Version 11 Release 6
  75. SI        Sample Implementation, usually refering to the PEX-SI
  76.  
  77. ------
  78. Subject:  1)  What's new?
  79. From: Karl Schultz
  80. Date: Sat Jul 15 1995
  81.  
  82. Many articles updated or rewritten to reflect the many changes to PEX
  83. since the last (Mar94) revision.
  84.  
  85. 7 Aug 95:
  86.  
  87.  - adjusted headers to appease the *.answers approvers.
  88.  - added FAQ for hardcopy.
  89.  
  90. 29 Nov 95:
  91.  
  92.  - added articles 17 and 18.
  93.  
  94. 30 Nov 95:
  95.  
  96.  - added article 19.
  97.  
  98. ------
  99. Subject:  2)  What is PEX?
  100. From: hersh@expo.lcs.mit.edu (Jay Hersh)
  101. Date: Mon Dec  7 14:10:47 MST 1992
  102. Message-Id: <9201201706.AA13024@xenon.lcs.mit.edu>
  103.  
  104. It is a an Extension to the Core X Protocol to provide 3D graphics 
  105. support within the X Windows environment.  
  106.  
  107. [PEX originally stood for PHIGS Extensions to X because it was
  108. once intended to be used for implementing PHIGS in the X Windows
  109. environment due to the popularity of PHIGS at that time.  As time
  110. passed, PHIGS support became less interesting, and the goal of
  111. supporting PHIGS became secondary to providing support for 3D application
  112. programs in general. Today's PEX contains features well beyond
  113. those needed to support PHIGS. RT/KS]
  114.  
  115. Included in the X11R5 and X11R6 distributions is code for the
  116. Sample Implementation of the extensions to the X Windows server which
  117. implements the functionality defined by the PEX Protocol Extensions.
  118.  
  119. In order to access the PEX functional extensions to the X Server
  120. one must use an application that generates PEX Protocol.  The
  121. application can either generate the Protocol bytestream itself, or
  122. use something called an Application Protocol Interface or API for
  123. short.  One such API which is provided with the X11R5 distribution
  124. is the PHIGS 3D graphics standard.  This is a port of the PHIGS C
  125. language binding onto an internal layer which generates the PEX
  126. Protocol allowing this particular PHIGS implementation to work
  127. within the X windows environment. [This same PHIGS library may
  128. be found in the R6 contrib area, since it was withdrawn from the
  129. R6 distribution in favor of PEXlib. KS]
  130.  
  131. Other alternate APIs are available via anonymous ftp from ftp.x.org
  132. in the contrib areas.
  133.  
  134. R5 Content
  135.  
  136. Patches for a variety of problems in R5 are now available via
  137. anonymous ftp on ftp.x.org, and the xstuff mail archive.
  138.  
  139. Fixes are available via anonymous ftp to ftp.x.org,
  140. in the directory /pub/R5/fixes/.  The files for the new
  141. fixes are "fix-18", "fix-19", and "PEXlib.tar.Z".  PEXlib.tar.Z is
  142. part of fix #19.  
  143.  
  144. Note that PEXlib is available only via the patch (fix 19).
  145.  
  146. Instructions for applying the fixes are included in
  147. the files.  Fixes usually propagate to other distribution sites as
  148. well, so it may pay to check at a nearer site first.
  149.  
  150. [Hopefully, if you are using R5, you will be using a completely
  151. patched R5.
  152.  
  153. R6 Content
  154.  
  155. R6 contains all the patches for R5, including PEXlib, but no
  156. longer contains the PHIGS library.  The PHIGS library may be
  157. found in the R6 contrib area and can be built in the R6 tree
  158. with some difficulty. KS]
  159.  
  160. - Jay Hersh
  161.   MIT X Consortium
  162.  
  163. ------
  164. Subject:  3)  How can I tell if my X server supports PEX?
  165. From: hersh@expo.lcs.mit.edu (Jay Hersh)
  166. Date: Mon, 20 Jan 92 12:06:01 -0500
  167. Message-Id: <9201201706.AA13024@xenon.lcs.mit.edu>
  168.  
  169. The xdpyinfo command displays all the extensions supported by a server.
  170. If one of the extensions listed is X3D-PEX then your server supports PEX.
  171.  
  172. - Jay Hersh
  173.   MIT X Consortium
  174.  
  175. ------
  176. Subject:  4)  Why don't the R5 PEX demos work on my mono screen?
  177. From: xug@mta.com (X User's Group)
  178. Date: Sun, 15 Dec 91 20:51:04 GMT
  179. Message-Id: <1991Dec15.205122.5581@mta.com>
  180. Newsgroups: comp.windows.x
  181.  
  182. The R5 sample server implementation only works on color screens, sorry.
  183.  
  184. ------
  185. Subject:  5)  Where can I get an X-based PEX package?
  186. From: xug@mta.com (X User's Group)
  187. Date: Sun, 15 Dec 91 20:53:23 GMT
  188. Message-Id: <1991Dec15.205323.5657@mta.com>
  189. Newsgroups: comp.windows.x
  190.  
  191.     The official release of PEX is with X11R5 and X11R6 from
  192. the X Consortium.
  193.  
  194.     PEX is supplied with various distributions of XFree and Linux.
  195.  
  196.     Many vendors supply PEX with their workstations.
  197.  
  198.     There is now available from the University of Illinois an 
  199. implementation of the PEX 4.0 specification called UIPEX. It contains a "near-
  200. complete" implementation of PHIGS and PHIGS PLUS. The file 
  201. pub/uipex/uipex.tar.Z is on a.cs.uiuc.edu (128.174.252.1); the porting platform
  202. was an RT running 4.3.  Questions and comments can to go uipex@cs.uiuc.edu. 
  203. [I do not know the status of this package. KS]
  204.  
  205.     In addition, the PEXt toolkit by Rich Thomson
  206. (thomson@jensen.cs.utah.edu) is available from the X Consortium contrib 
  207. areas as PEXt.tar.Z; it includes a PEX widget making it easier to 
  208. include PEX in Xt-based programs.
  209.  
  210.     [Jan Hardenburgh's PEXIM should also be available from the
  211. X Consortium contrib areas. KS]
  212.  
  213. ------
  214. Subject:  6) What about immediate mode for PEX?
  215. From: jch@Stardent.COM (Jan "Yon" Hardenbergh)
  216. Date: 7 May 91 15:39:02 GMT
  217. Message-Id: <1991May7.153902.6083@Stardent.COM>
  218. References: <JIM.91May6113744@baroque.Stanford.EDU>
  219. Newsgroups: comp.graphics
  220.  
  221. PEX has immediate mode intrinsically.  No need to add it.  What is
  222. needed is the API.  There are currently three proposed interfaces to PEX
  223. Immediate mode: PEXIM, PEXlib and PEXtk.  PEXIM is actually a PHIGS
  224. subset with immediate mode extensions.  PEXlib is to the PEX protocol
  225. what Xlib it to the X protocol.  PEXtk is trying to capture the best of
  226. the proprietary graphics interfaces.
  227.  
  228. Of course, PEXIM has the advantage that graphics hackers familiar with
  229. PHIGS can pick it right up, or that can read one of the (great :-) PHIGS
  230. books coming out.
  231.  
  232. The ANSI PHIGS committee started to add immediate mode to PHIGS.  So,
  233. eventually, the API for PEX immediate mode will probably fall back to
  234. PHIGS, but that is just opinion.
  235.  
  236. From: jim@baroque.Stanford.EDU (James Helman)
  237. > But does this actually address the problem?  The main reason that
  238. > PHIGS is well-suited for networked graphics is that once your large
  239. > mass of geometry is downloaded, you can rapidly change attributes and
  240. > transformations without blasting the whole object down the slow wire.
  241. > But in immediate mode, one typically sends everything down the wire
  242. > each draw cycle.  With graphics speeds hitting 1 million polys per
  243. > second, you certainly can't blast enough data down an ethernet to feed
  244. > the graphics hardware.
  245.  
  246. You have to look at what is happening to the majority of the data.  If
  247. the geometry is stable but the attribute change, then you can store the
  248. geometry in the server and use immediate mode to send the attributes.
  249. This is referred to as "mixed mode" or mixing stored structures with
  250. immediate mode.  This is a very powerful model of graphics.
  251.  
  252. > Hence unless network bandwidth outpaces graphics performance, an
  253. > immediate mode PEX API won't be particularly useful over a network.
  254. > One could replace the PEX layer with local graphics access to get
  255. > performance, thus making the immediate mode PEX API a standard for
  256. > non-PEX graphics, but this is a rather convoluted path to such an end.
  257.  
  258. It's never safe to assume that the relative speeds of components of the
  259. system will stay the same.  You are comparing the high end of rendering
  260. with the low end of networking.  Compare the current high end of
  261. networking, like FDDI at 12 MBytes per second and it works out just
  262. fine.  1 M polygons/sec takes 12 MB / second.  Of course both of those
  263. numbers are PEAK numbers.  When you start to look at what applications
  264. really do, the peak numbers become irrelevant.
  265.  
  266. > Maybe GL and XGL's days aren't so numbered.  Or am I missing
  267. > something?  Perhaps, local shared memory PEX request queues?  The
  268. > article didn't even mention bandwidth as a concern.
  269.  
  270. Yes, of course good implementations of PEX will have shared memory.
  271.  
  272. [And today there are "local" implementations that can bypass the
  273. protocol completely and control the graphics device directly when
  274. the application is running local to the display hardware. KS]
  275.  
  276. But let's talk about the bread and butter cases.  The majority of the
  277. market has not hit the 30 K triangles per second mark.  Ethernet can
  278. keep up with that quite easily, and shared memory does more than keep
  279. up.
  280.  
  281. But, there is overhead in a network transparent protocol.  To get rid of
  282. it would require the application to write thier data directly into the
  283. shared memory, then there are no copies, still something to work for.
  284. People used to say X would never work due to the overhead, or for that
  285. matter that fancy UI's do not work due to the overhead.  Depends on what
  286. you want and where your priorities are.
  287.  
  288. My guess is that the combination of compute servers and PEX terminals
  289. and workstations will help PEX become the graphics of choice.  If you
  290. are not recomputing your 1 million triangles they can be in the display
  291. list.  If you are recomputing them, how long does that take? on what
  292. machine?
  293.  
  294. Disclaimer: I've had something to do with PEX and PEXIM and I always
  295. speak on my own behalf, unless specifically stated otherwise.
  296.  
  297. -Jan "YON" Hardenbergh       jch@stardent.com         (508)-371-9810x261
  298. Stardent Computer, 6 N.E. Tech Center, 521 Virginia Rd,Concord, MA 01742
  299.  
  300. ------
  301. Subject:  7)  Why don't the R5 PEX contributed demos compile?
  302. From: hersh@expo.lcs.mit.edu
  303. Date: Thu, 30 Apr 92 15:39:27 -0400
  304. Message-Id: <9204301939.AA06066@exhume.lcs.mit.edu>
  305.  
  306. >   [Initially at the time of R5's release...] it was a bit of
  307. >   work to upgrade PEX to the new ISO IS PHIGS C Binding.  The examples
  308. >   had been put into contrib a while back and there was no time nor
  309. >   manpower to worry about updating those when other things had to be
  310. >   fixed and upgraded (like the man pages).
  311.  
  312. The demos have been upgraded.  The new versions for the ISO PHIGS C
  313. binding are available from export.lcs.mit.edu  in the file
  314. PEX.examples.tar.Z in the directory contrib/R5fixes.
  315.  
  316. - Jay Hersh
  317.  
  318. -----
  319. Subject:  8)  Why doesn't double-buffering work via phigs_ws_type_create?
  320. From: thomson@jensen.cs.utah.edu (Rich Thomson)
  321. Date: Sat, 23 Nov 91 20:38:52 GMT
  322. Message-ID: <1991Nov23.203852.3673@dsd.es.com>
  323. References: <1991Nov22.220338.3560@shell.shell.com>
  324. Newsgroups: comp.graphics,comp.windows.x
  325.  
  326. In article <1991Nov22.220338.3560@shell.shell.com>
  327.     senften@taurus (Scott D. Senften) writes:
  328. >
  329. >I need your help...I just got X11R5 up and running on my Sparc and I'm wanting
  330. >to do some PHIGS+ work.  I've got a rough prototype up and running but I can't
  331. >seem to get the double buffering working.  I tried:
  332. >
  333. > wks = phigs_ws_type_create(phigs_ws_type_x_tool,
  334. >                            PHIGS_X_BUF_MODE, PHIGS_BUF_DOUBLE,
  335. >                            0);
  336. >
  337. >but that alone doesn't seem to do it.  Am I missing something?
  338.  
  339. What you're missing is that the PEX-SI provides no support for double
  340. buffering.
  341.  
  342. A serious hole in the PEX-SI is its non-support for double buffering.
  343. Even worse, the PEX-SI api assumes that the client desires an
  344. XClearArea on the window before each frame is drawn.  What really
  345. should have been done was to provide an end-of-render procedure hook,
  346. with the default hook installed to do a clear area.
  347.  
  348. Individual vendors (because of market pressure) have provided their
  349. own solutions to the double buffering problem (we do double buffering
  350. an all PHIGS workstations; if you do immediate-mode you get single
  351. buffering along with the PEX-SI's XClearArea call).
  352.  
  353. I believe the PEX interoperability group is currently working on a vendor
  354. neutral solution that we can all agree on.
  355.  
  356.                         -- Rich
  357.  
  358. -----
  359. Subject:  9)  What does "Kernel not configured with shared-memory IPC" mean?
  360. From: michaelh@homebrew.WV.TEK.COM (Mike Herbert)
  361. Date: 25 Nov 91 18:54:35 GMT
  362. Message-ID: <12065@orca.wv.tek.com>
  363. Newsgroups: comp.windows.x
  364.  
  365. Francis J. Hitchens writes:
  366. > I have just built X11R5 on my VAXstatsion 3100, under ULTRIX 4.1, and
  367. > tried to run the PEX
  368. > tests.
  369. >
  370. > They all failed...
  371. >
  372. > PHIGS error -57 in OPEN PHIGS: Kernel not configured with shared-memory IPC
  373. > facility needed for PEX SI communication
  374.  
  375. I ran into this problem last week.  Here's what I've determined so far.
  376.  
  377. Your PEX library has been built so that it is trying to use the shared-memory
  378. IPC facility to communicate with the phigsmon program.  If your client
  379. does not need phigsmon, then turn it off:
  380.  
  381. setenv PEX_SI_API_NO_PM 1
  382.  
  383. (Typically you should only need phigsmon for doing PHIGS input or client-
  384. side structure storage.)
  385.  
  386. Another alternative is to rebuild the PEX library so that it uses sockets
  387. to communicate with phigsmon.  You can do this by defining 
  388. "PEX_API_SOCKET_IPC".  (I haven't tried this, but the code indicates
  389. that it should work.) 
  390.  
  391. The other alternative, of course, it to configure your kernel to use IPC.
  392. (I'm a novice as far as Ultrix is concerned, so I really don't understand
  393. what's involved in doing that.)
  394.  
  395. Mike Herbert
  396. Tektronix, Inc.
  397. Network Displays Division
  398. P.O. Box 1000, M/S 60-850
  399. Wilsonville, OR 97070
  400. (503) 685-2145
  401.  
  402. michaelh@orca.WV.TEK.COM
  403.  
  404. -----
  405. Subject:  10)  Obtaining Graphics Standards (GKS, PHIGS, etc.)
  406. From: jch@Stardent.COM (Jan "Yon" Hardenbergh)
  407. Date: 12 Feb 91 19:27:53 GMT
  408. Message-ID: <1991Feb12.192753.3647@Stardent.COM>
  409. Newsgroups: comp.graphics
  410.  
  411. GKS - Graphical Kernal System - geometric graphics system
  412. CGM - Computer Graphics Metafile - archive of graphics commands - very
  413.       useful for plotting.
  414. PHIGS - the best graphics standard!  3D geometric graphics with lighting
  415.       and shading and neat primitives to draw fancy pictures.
  416. If you are looking for a broad overview of graphics standards you might
  417. try this:
  418.  
  419. >   Guidelines for determining when to use GKS and when to use PHIGS
  420. >   Bettels, J.; Bono, P.R.; McGinnis, E.; Rix, J.
  421. >   Author Affil:  Digital Equipment Corp., Geneva, Switzerland
  422. >   Source: Comput. Graph. Forum (Netherlands)  vol.7, no.4,    pp.: 347-54
  423. >   Publication Year: Dec. 1988
  424. >   (29 Refs)
  425. >   Abstract:  GKS,  GKS-3D, and PHIGS are all approved ISO standards for the
  426. > application  programmer  interface.  How  do system analysts or programmers
  427. > decide which standard to use for their application? The authors discuss the
  428. > range  of  application  requirements  likely to be encountered, explore the
  429. > suitability  of  GKS and PHIGS for satisfying these requirements, and offer
  430. > guidelines to aid in the decision process. 
  431.  
  432. I know I've seen other overviews of graphics standards. Just none recently.
  433.  
  434. There are a couple of books on CGM and GKS, but I do not have the
  435. references written down.
  436.  
  437. As, for PHIGS, you can get the standard itself from ANSI in New York.
  438. 212-642-4900, 11 West 42nd Street, NY, NY 10036.  [The following table
  439. gives the ANSI standard numbers corresponding to the PHIGS standards:
  440.  
  441.     ANSI X3.144-1988    ISO 9592 parts 1, 2 and 3 for PHIGS
  442.     ANSI X3.144.1        ISO 9593-1 for PHIGS FORTAN binding
  443.     ANSI X3.144.3        ISO 9593-3 for PHIGS Ada binding
  444.     ANSI X3.144.4        ISO 9593-4 for PHIGS C binding
  445.  
  446. --RT]  They will also have the GKS and CGM specs.
  447.  
  448. -Jan "YON" Hardenbergh       jch@stardent.com         (508)-371-9810x261
  449. Stardent Computer, 6 N.E. Tech Center, 521 Virginia Rd,Concord, MA 01742
  450.  
  451. -----
  452. Subject: 11) PHIGS/PEX books
  453. From: jch@adbeta9.prime.com (Jan Hardenbergh )
  454. Date: Fri, 3 Sep 1993 00:31:21 GMT
  455. Summary:  lots of PHIGS and PEX books out there.
  456. Id:  <CCr5G9.28q@cvbnet.CV.COM>
  457.  
  458. I'm perhaps not the best judge, since I have them all (or will soon) and
  459. have a trial membership to the authors club, where we all chum around
  460. together :-)
  461.  
  462. But if your job is actually to work with either PHIGS or PEX, SPEND the
  463. $200+ or so to get many of the books here. It's a tiny investment in
  464. your career, especially if you get reimbursed! If you are the type that
  465. only wants one book on a subject, go to a bookstore and look carefully
  466. at which one you want, after all, you can't judge a book by its email.
  467.  
  468. The books I'd buy again appear in order of appearance.
  469.  
  470. PHIGS Books
  471. ===========
  472.  
  473. Toby Howard et al. "A Practical Introduction to PHIGS and PHIGS PLUS"
  474. Addison-Wesley 1991, ISBN 0-201-41641-7
  475.   A "great" small book on PHIGS.  Covers almost everything, but briefly.
  476.   Not good to program from, but if your question is what is PHIGS, this
  477.   will be the best place to start for most people.
  478.  
  479. Tom Gaskins. "PHIGS Programming Manual", O'Reilly 1992, 
  480.     ISBN 0-937175-92-7 (casebound)  ISBN 0-937175-85-4 (soft)
  481.   This is the most comprehensive and the best to program from for Sun
  482.   and any PEX-SI based PHIGS product. Tom knows this stuff inside and out.
  483.  
  484. Joseph E Kasper and David Arns."Graphics Programming with PHIGS and PHIGS-PLUS"
  485. HP Press/Addison Wesley, ISBN 0-201-56343-6
  486.   A book more oriented to the standard than Gaskins' book, It has
  487.   both FORTRAN and "C" and uses new binding. Especially good for HP.
  488.  
  489. John W. Blake. "PHIGS + PHIGS+, An Introduction to 3D Computer Graphics"
  490. Acedemic Press/Harcourt Brace Jovanovich Ltd. ISBN 0.12.103515.8
  491. (only from 24-28 Oval Road, London, NWI 7DX, UK //  Lbs 29.95 ??)
  492.   I'm buying it, sight unseen...
  493.  
  494. "PHIGS Reference Manual", O'Reilly 1992, Edited by Rich Ellis & ...
  495.  ISBN 0-937175-91-9
  496.   Man Pages (improved version of the PEX-SI man pages)
  497.  
  498. Hopgood & Duce, "A Primer for PHIGS" John Wiley & Sons Ltd,
  499. ISBN: 471 93042 3 (no PHIGS-PLUS)
  500.   Some useful notions on structure editing.
  501.  
  502. W.A. Gaman, W.A. Giovinazzo, "PHIGS by Example", Springer-Verlag,
  503. ISBN 0-387-97555-1
  504.  
  505. PEX Books
  506. =========
  507.  
  508. Tom Gaskins' "PEXlib Programming Manual", O'Reilly 1992, ISBN 0-56592-028-7
  509.   This is a great book.
  510.  
  511. Paula Womack, PEXlib: A Tutorial, Prentice Hall 1993 (printing, due October)
  512. ISBN 013-015843-7.
  513.   Sight unseen. Paula was document editor for PEX 5.1, I'd bet it's great.
  514.  
  515. Mark Graff, PEXlib: A Reference Manual, Prentice Hall, ISBN 013-176066-1, 
  516.   Sight unseen.
  517.  
  518. "PEXlib Reference Manual", O'Reilly 1992,  ISBN 1-56592-029-5
  519.   Man pages for PEXlib SI,  with intro by Tom Gaskins.
  520.  
  521. ...and one more...
  522. Jan Hardenbergh, Building Applications with PEXlib, Prentice Hall, (December)
  523. ISBN 013-012535-0.
  524.   I've seen too much of this to be impartial! I like it. 
  525.  
  526. My conscience is clean (still) about using the internet for commercial gain.
  527. I've been sending out these lists of PHIGS books since before I had even
  528. thought of writing one. But at this point I'll stop because I think it is
  529. a gray area. I hope someone else will take it up. Joe?
  530.  
  531. Opinions expressed are my own, my employer uses HOOPS!
  532. Jan "YON" Hardenbergh     - jch@cvbnet.cv.com -      617-275-1800x3275
  533. Computervision Corp.        MS 5-2, 14 Crosby Drive, Bedford, MA 01730
  534. "Imagination is more important than knowledge" A. Einstein - Thank God!
  535. -----
  536.  
  537. Subject: 12) Articles on PEX
  538. From: klee@wsl.dec.com (Ken Lee)
  539. Date: 12 Aug 91 17:06:05 GMT
  540. References: <1991Aug12.100605@wsl.dec.com>
  541.  
  542. Clifford, William, John McConnell, and Jeffrey Friedberg, "The Development
  543.      of PEX, A Three-dimensional Graphics Extension to X11," in Proceedings
  544.      of Eurographics'88, September, 1988.  An overview PEX, an extension to
  545.      the X protocol to support PHIGS+.
  546.  
  547. Rost, Randi, Jeffrey Friedberg, and Peter Nishimoto, "PEX:  A Network-
  548.      Transparent 3D Graphics System," IEEE Computer Graphics & Applica-
  549.      tions, pp. 14-26, July, 1989.  A good overview of PEX, the
  550.      PHIGS/PHIGS+ 3D extension to X. A complete PEX is currently being
  551.      developed by Sun under contract to the MIT X Consortium and is
  552.      scheduled to be publicly available in 1991.
  553.  
  554. Stroyan, Michael, "Three-Dimensional Graphics Using the X Window System,"
  555.      Dr. Dobb's Journal, vol. 15, no. 2, pp. 28-36, February, 1990.  A high
  556.      level description of various approaches to developing 3D graphics
  557.      tools for X, including those of the PHIGS Extension to X (PEX) and
  558.      HP's Starbase-on-X11 (sox11).
  559.  
  560. Sung, Hsien Ching Kelvin, Greg Rogers, and William Kubitz, "A Critical
  561.      Evaluation of PEX," IEEE Computer Graphics & Applications, vol. 10,
  562.      no. 6, pp. 65-75, November, 1990.  An evaluation of PEX, the X exten-
  563.      sion to support PHIGS, from the point of view of a PHIGS implementor.
  564.  
  565. Thomas, Spencer W. and Martin Friedmann, "PEX - A 3-D Extension to X Win-
  566.      dows," in Proceedings of the Winter, 1989 USENIX Conference, pp. 139-
  567.      149.  Describes a demonstration implementation of PEX, the
  568.      PHIGS/PHIGS+ 3D extension to X. A complete PEX is currently being
  569.      developed by Sun under contract to the MIT X Consortium and is
  570.      scheduled to be publically available in 1991.
  571.  
  572. -----
  573. Subject: 13)  PEX Application Programmer Interfaces (APIs)
  574. From: thomson@jensen.cs.utah.edu (Rich Thomson)
  575. Date: Tue Mar  2 22:27:37 MST 1993
  576.  
  577. When discussing PEX, it is important not to confuse the protocol with
  578. the API, or application programmer interface.  The API is the
  579. conceptual model of 3D graphics that the application developer sees.
  580. The protocol is generated by the API and is interpreted by the server
  581. to perform graphics requests on behalf of the client program.
  582.  
  583. One API provided with the R5 PEX-SI is a PHIGS/PHIGS-PLUS API.  The
  584. PHIGS/PHIGS-PLUS standards are specified in two parts.  First, a
  585. functional description describes each operation conceptually, in a
  586. language-independent manner.  Second, language bindings are used to
  587. bind the particular PHIGS functions to the semantics of the language.
  588. The PEX-SI comes with an application programmer interface that
  589. conforms with the latest revision of the PHIGS/PHIGS-PLUS C language
  590. binding.
  591.  
  592. Bob Schulte of SHOGraphics had this to say about their GL-like API
  593. called PEXtk:
  594.  
  595.     Newsgroups: comp.windows.x.pex
  596.     From: rws@shograf.com (Bob Schulte)
  597.     Subject: Re: difference between PEX and GL
  598.     Date: Fri, 5 Feb 1993 16:03:42 GMT
  599.  
  600.     PEXtk is complete and available now directly from export.mit.lcs.edu,
  601.     and is located in /contrib. The files are pextk.PS.tar.Z, pextk.README,
  602.     and pextk.tar.Z.  It is Free.
  603.  
  604.     Depending on how you write a GL program and what features you use
  605.     it may or may not be difficult to port to PEXtk. It would certainly
  606.     be easier than porting to PHIGS.
  607.  
  608.     For example PEXtk uses X as its windowing system, so the UI is X
  609.     based. We have not attempted to duplicate any GL windowing functions.
  610.  
  611.     Bob
  612.     --
  613.     Bob Schulte,        E-Mail: rws@shograf.com    Voice: (408) 524-4015
  614.     SHOgraphics.        Performance Through PEX
  615.  
  616.  
  617. If your version of R5 is patched through patch #22, you have a second
  618. MIT supplied API called "PEXlib".  PEXlib is to the PEX protocol what
  619. Xlib is to the core X protocol.  PEXlib provides an interface that is
  620. as close as possible to a one-to-one correspondence between functions
  621. and protocol requests.  It is intended to be a systems programming
  622. interface (i.e. people developing graphics toolkits and graphics
  623. systems will implement their system on top of PEXlib).  It is proposed
  624. that the PHIGS API be ported to PEXlib once PEXlib is finalized.  This
  625. change would not affect programs written to the existing PHIGS API.
  626. However, since PEXlib is intimately tied to the protocol, it is
  627. expected that there will be changes between the current PEXlib (which
  628. supports version 5.0 and 5.1 of the PEX protocol) and the PEXlib that
  629. supports the next major version of the PEX protocol, version 6.0.
  630. Naturally, every attempt will be made to make the changes to the API
  631. minimal.  The nature of the changes from 5.1 to 6.0 are not such that
  632. every primitive will be affected; rather the changes deal with the
  633. sticky problems of subsets, multi-buffering, and other issues of
  634. global rendering semantics.
  635. [PEX 6.0 was dropped and a backwards compatible PEX 5.2 was created
  636. instead. KS]
  637.  
  638. The future may contain other popular graphics APIs (SGI's GL, HP's
  639. Starbase, Stardent's Dore') that also generate the PEX protocol.
  640.  
  641.                         -- Rich
  642. -----
  643. Subject: 14)  PHIGS Toolkit -- a portable toolkit for PHIGS programmers
  644. From: Gareth Williams <williamj@computer-science.manchester.ac.uk>
  645. Date: Mon, 8 Feb 93 08:56:20 GMT
  646. Message-Id: <9302080856.AA04031@r3i.cs.man.ac.uk>
  647.  
  648.                      THE PHIGS TOOLKIT
  649.  
  650.      A PORTABLE TOOLKIT FOR PHIGS APPLICATION PROGRAMMERS
  651.  
  652.             *************************************
  653.             **** NEW RELEASE VERSION 3.2 FOR ****
  654.             ****       SunPHIGS 2.0          ****
  655.             ****       HP PHIGS 2.2          ****
  656.             **** ##    IBM graPHIGS 1.02  ## ****
  657.             ****         PEX-SI              ****
  658.             *************************************
  659.  
  660. We are pleased to announce the availability of version 3.2 of the PHIGS
  661. Toolkit, a portable toolkit for PHIGS application Programmers. The PHIGS
  662. Toolkit has been developed at the University of Manchester, UK, and is
  663. funded by the Science and Engineering Research Council (SERC) and the
  664. Advisory Group on Computer Graphics (AGOCG). The Toolkit is based on the
  665. experience of the developers who have been active PHIGS programmers for
  666. several years and were also involved in the ISO technical review of PHIGS
  667. and PHIGS PLUS.
  668.  
  669. Following the release in September this year of version 3.1 of the PHIGS
  670. Toolkit, version 3.2 is now available which supports SunPHIGS 2.0,
  671. HP PHIGS 2.2, IBM graPHIGS 1.02 and MIT's PEX-SI.
  672.  
  673. MAIN FEATURES OF THE TOOLKIT
  674. ----------------------------
  675.  
  676.  o comprehensive transformations library
  677.  o automatic drawing of structure network hierarchy diagrams
  678.  o automatic drawing of structure content diagrams
  679.  o interactive CSS debugger
  680.  o interactive view editor
  681.  o window system implemented using PHIGS structures
  682.  o interactive PHIGS Interpreter
  683.  o comprehensive colour model support library
  684.  o menu system to extend PHIGS input
  685.  
  686.  o Runs with C and FORTRAN for SunPHIGS on SunOS
  687.  o Runs with C for HP PHIGS on HP-UX
  688.  o Runs with C for graPHIGS on AIX
  689.  o Runs with C for PEX-SI on SunOS
  690.  o Runs with C and FORTRAN for DEC PHIGS on VAX/VMS (PTK 2.0 only)
  691.  
  692.  o full source code provided
  693.  o demonstration programs provided
  694.  o comprehensive documentation
  695.  
  696. WHAT IS THE PHIGS TOOLKIT?
  697. --------------------------
  698.  
  699. The purpose of the PHIGS Toolkit is to help application programmers to
  700. program more effectively and securely using PHIGS. The functionality
  701. provided by PHIGS is low-level, and the PHIGS Toolkit provides a number of
  702. tools of various levels of complexity in order to make programming with
  703. PHIGS quicker, and less painful.  To the programmer, it is as if the
  704. functions provided by PHIGS have been supplemented with a set of additional
  705. functions, and a typical application will use both `raw' PHIGS functions as
  706. well as PHIGS Toolkit functions.  A convenient way to view the Toolkit is
  707. as a layer of software which sits `on top of' PHIGS.
  708.  
  709. Tools in the PHIGS Toolkit are divided into two categories: PROGRAMMING
  710. TOOLS, and HIGH-LEVEL TOOLS.  Programming tools are generally quite simple
  711. single-purpose procedures, and are designed to help applications
  712. programmers to construct PHIGS programs more quickly and reliably. The
  713. high-level tools are more powerful, and provide programmers with means for
  714. visualising and debugging structure networks.
  715.  
  716. PROGRAMMING TOOLS
  717. -----------------
  718.  
  719.  o the Transformations Library -- functions for
  720.    constructing and manipulating coordinate transformations.
  721.  
  722.  o the HashStrings Library -- functions which enable text
  723.    strings to be used in situations where integers would normally
  724.    be required.
  725.  
  726.  o the PHIGS Utilities Library -- utility functions,
  727.    providing operations (such as `copy element') which are not directly
  728.    provided by PHIGS, as well as common sequences of PHIGS function calls
  729.    `bundled up' into single functions.
  730.  
  731.  o the PHIGS Traversal State List Library -- functions for
  732.    controlling and inquiring a simulated structure network traversal.
  733.  
  734.  o the Colour Library -- functions for defining colour
  735.    values using English words and phrases, and for interchangeably
  736.    manipulating colours using various colour models.
  737.  
  738.  o the PHIGS Textual Interpreter (Phinter) -- a tool for reading textual
  739.    PHIGS scripts. Phinter may be used interactively with a PHIGS string device
  740.    or standard input.
  741.  
  742. HIGH-LEVEL TOOLS
  743. ----------------
  744.  
  745.  o the PHIGS Structure Content Drawer -- a tool to generate diagrams
  746.    showing which elements structures contain.  The diagrams are themselves
  747.    PHIGS structures, with a documented format.
  748.  
  749.  o the PHIGS Topology Library -- functions for
  750.    automatically generating diagrams representing the topology of PHIGS
  751.    structure networks. The diagrams are themselves PHIGS structures, with a
  752.    documented format.
  753.  
  754.  o the PHIGS Menus Library -- functions for constructing
  755.    and manipulating menus built using PHIGS structures.
  756.  
  757.  o the PHIGS Windows Library -- functions for displaying
  758.    and viewing PHIGS structure networks in windows.
  759.  
  760.  o the PHIGS Debugger -- a tool (modelled after conventional
  761.    programming language debuggers) for simulating the traversal of structure
  762.    networks. The traversal may be stepped through incrementally and the state
  763.    of the traversal inquired at any stage.
  764.  
  765.  o the PHIGS View Editor -- a utility for interactively editing and
  766.    experimenting with viewing parameters for a scene.
  767.  
  768. PHIGS TOOLKIT INFORMATION   ** REGISTER NOW **
  769. ----------------------------------------------
  770.  
  771. We would like to encourage all people interested in the PHIGS Toolkit to
  772. register as PHIGS Toolkit users. This will ensure that all PHIGS Toolkit
  773. users will receive notice of new versions, course dates, bug reports and
  774. any other useful information.  Please send the following information to
  775. phigstoolkit@cs.man.ac.uk.
  776.  
  777.    Name:
  778.    Organisation:
  779.    email:
  780.    Telephone/FAX:
  781.    PHIGS implementations used:
  782.  
  783. Even if the PHIGS Toolkit is not currently available for your particular
  784. PHIGS implementation, please register. We are currently working on ports to
  785. several other PHIGS implementations and it would be very useful to know
  786. what the demand is for different versions.
  787.  
  788. HOW TO OBTAIN THE PHIGS TOOLKIT
  789. -------------------------------
  790.  
  791. The PHIGS Toolkit is available from two sites in the UK:
  792.  
  793. PTK from Kent
  794. -------------
  795.  
  796. The PHIGS Toolkit is available from HENSA (Higher Education National 
  797. Software Archive) at the University of Kent.
  798.  
  799. The HENSA Service at the University of Kent can be accessed in a number 
  800. of ways:
  801.  
  802. Interactive
  803. -----------
  804.  
  805. There is a friendly interactive interface which has a useful find
  806. utility for locating software.  Connect to unix.hensa.ac.uk and log
  807. in as "archive" for an interactive interface to the HENSA archive.  
  808. Connections can be made using telnet (unix.hensa.ac.uk) and X.29 
  809. across JANET (uk.ac.hensa.unix, DTE 000049200900).
  810.  
  811. anonymous ftp
  812. -------------
  813.  
  814. Using DARPA FTP connect to the machine unix.hensa.ac.uk and
  815. login as "anonymous", giving your email address as the password.
  816.  
  817. guest NI-FTP]
  818. Using Blue Book NI-FTP with the following:
  819.  
  820. address: uk.ac.hensa.unix
  821. login: guest
  822. path: <ARCHIVE>/filename
  823.  
  824. eg.     % fcp -b "<ARCHIVE>/uunet/ls-lR.Z"@uk.ac.hensa.unix ls-lR.Z
  825. User name on uk.ac.hensa.unix? guest
  826. Password on uk.ac.hensa.unix? jn@ukc.ac.uk
  827.  
  828. email server
  829. ------------
  830.  
  831. Send a message to "archive@unix.hensa.ac.uk" containing the 
  832. string "help" for details on how to use it.
  833.  
  834. Any general queries regarding the HENSA service at The University of
  835. Kent should be directed to hensa@unix.hensa.ac.uk, queries specific to
  836. the Netlib service should be sent to netlib-admin@unix.hensa.ac.uk and
  837. stuff concerning the source archive to archive-admin@unix.hensa.ac.uk.
  838.  
  839. The relevant files for the PHIGS Toolkit on HENSA are:
  840.  
  841. PTK 3.2     /misc/unix/phigstk/PhigsToolkit3.2.tar.Z 
  842.                                       for SunPHIGS 2.0 on SunOS, 
  843.                                           HP PHIGS 2.2 on HP-UX,
  844.                                           graPHIGS 1.02 on AIX,
  845.                                           PEX-SI on SunOS.
  846.  
  847. PTK 2.0    /misc/unix/phigstk/PhigsToolkit.tar.Z 
  848.                                       for SunPHIGS 1.x on SunOS.
  849.            /misc/vms/phigstk/ptk.hex for DEC PHIGS 2.3A on VAX/VMS.
  850.  
  851. PTK from Manchester
  852. -------------------
  853.  
  854.   By anonymous ftp from uk.ac.mcc.hpb. (130.88.200.7) 
  855.   Username "anonymous", and your network address as password.
  856.   The files are:
  857.  
  858. PTK 3.2     pub/cgu/ptk/ptk3.2.tar.Z for SunPHIGS 2.0 on SunOS, 
  859.                                   HP PHIGS 2.2 on HP-UX,
  860.                                   graPHIGS 1.02 on AIX,
  861.                                   PEX-SI on SunOS.
  862.  
  863. PTK 2.0     pub/cgu/ptk/ptk.tar.Z for SunPHIGS 1.x on SunOS.
  864.  
  865.             pub/cgu/ptk/ptk.shar* for DEC PHIGS 2.3A on VMS.
  866.  
  867. (
  868. For VMS the Toolkit is stored as a collection of SHAR files.
  869. There are 288 files in total, each 15K in size.
  870. They are called ptk.shar_X where X is 1 ... 288.
  871. To rebuild the Toolkit directory structure the
  872. files must be concatenated together and run as a command file.
  873.  
  874.    $ copy ptk.shar_%, ptk.shar_%%, ptk.shar_%%% ptk.shar
  875.    $ @ptk.shar
  876. )
  877.  
  878. PTK by Magnetic Tape
  879. --------------------
  880.  
  881. Send a 1/4 inch cartridge for SunOS, and a 1/2 inch open reel magnetic tape
  882. for VMS to:
  883.  
  884. Tim Hopkins
  885. Computing Laboratory
  886. University of Kent
  887. email: trh@uk.ac.ukc
  888.  
  889. or
  890.  
  891. Toby Howard
  892. Department of Computer Science
  893. University of Manchester
  894. Oxford Road
  895. Manchester M13 9PL
  896. United Kingom
  897. Tel: +44 61 275 6274
  898. Fax: +44 61 275 6236
  899. email: toby@uk.ac.man.cs
  900.  
  901. PHIGS TOOLKIT TRAINING COURSE
  902. -----------------------------
  903.  
  904. A training course for users of the PHIGS Toolkit was held at the
  905. University of Manchester on September 23rd 1992. Course materials
  906. including four programming exercises and three step-through
  907. tutorials are provided in this release of the Toolkit.
  908.  
  909. FUTURE WORK
  910. -----------
  911.  
  912. The first phase of the PHIGS Toolkit does not include support for PHIGS
  913. PLUS. Work is now underway to expand the Toolkit to include extensive
  914. support for PHIGS PLUS functions, and the expanded PHIGS Toolkit will be
  915. released in April 1993. 
  916.  
  917. A toolkit providing support for NURBS curves and surfaces has also
  918. been developed at Manchester, and is designed to be complementary to 
  919. the PHIGS Toolkit. It is available from the same sites as PTK.
  920.  
  921. BETA TEST
  922. ---------
  923.  
  924. We are currently looking for beta testers for the PHIGS PLUS extensions 
  925. and the test will start in the new year and finish at the end of February 
  926. 1993. A short report will be required from testers. Please get in touch 
  927. if you are interested in being a tester.
  928.  
  929. Toby Howard, Terry Hewitt, Gareth Williams, Steve Larkin, David Yip
  930. University of Manchester
  931. Oxford Road, Manchester, M13 9PL, United Kingdom
  932.  
  933.  
  934. -----
  935. Subject: 15)  Why doesn't HLHSR mode (Z buffering) work with the PEX-SI?
  936. From: Rich Thomson <thomson@jensen.cs.utah.edu>
  937. Date: Mon Mar 28 14:14:49 MST 1994
  938.  
  939. Sorry, the PEX-SI doesn't have any support for hidden line and hidden
  940. surface removal (HLHSR), commonly implemented through Z buffering.
  941. The PEX-SI team decided that since Z buffering is very device specific
  942. they would leave it up to each vendor to implement Z buffering support
  943. for the first release.
  944.  
  945. [The PEX-SI (server code) decomposes PEX primitives down to X-level
  946. primitives and draws them via the DDX interface.  This allows the
  947. PEX-SI code to work with virtually any X server implementation.
  948. The downside is that certain non-X features like Z buffer operations
  949. and color interpolation of spans is not available. KS]
  950.  
  951. It is planned to provide software Z buffer HLHSR support in the
  952. PEX-SI, probably in the R6 release.
  953.  
  954. [There is a patch on contrib that does this. KS]
  955.  
  956. The PHIGS standard allows an implementation to provide only HLHSR mode
  957. NONE and still be a conformant implementation of the standard.  This
  958. is probably a leftover from the days of calligraphic and storage-scope
  959. type displays which don't have Z buffers or other HLHSR removal methods
  960. in hardware (except hardware-based sorting for hidden-line removal).
  961.  
  962.                         -- Rich
  963.  
  964.  
  965. -----
  966. Subject: 16) printing from PEX
  967. From: kws@fc.hp.com (Karl Schultz)
  968. Date: 4 Aug 1995 14:44:28 GMT
  969.  
  970. In article <3vl5ev$gn0@euler.space.net>, gero@PROBLEM_WITH_INEWS_DOMAIN_FILE (Gero Dargel) writes:
  971. > Hi,
  972. > can anybody tell me how to print (in better quality than 
  973. > screen-dump) from PEX-PHIGS (PEX-SI).
  974. > I'm looking for a mechanism like the CGM-workstation in
  975. > S?N-PHIGS.
  976.  
  977. In a word, no.
  978.  
  979. There may be a chance that some vendor has added this as a feature to
  980. their product.
  981.  
  982. Additional info:
  983.  
  984. The PHIGS SI doesn't support any sort of hardcopy workstation type.
  985. As noted above, some vendors may have PHIGS-related products that do
  986. this.  The PHIGS SI does have some support of "workstation types" in
  987. the area of whether or not PHIGS will create the window for you, or
  988. will accept an existing window to draw into as is convenient with
  989. toolkit applications.  This particular control is all implemented in
  990. the PHIGS client-side library, so no real PEX protocol support is
  991. required.
  992.  
  993. However, for additional workstation type requirements like hardcopy
  994. support where you want the work done in the server someplace, PEX
  995. would need some sort of extension or augmentation to allow the client
  996. to specify what workstation type to use when creating a workstation.
  997. In the PEX Workstation Subset, this might be some sort of list of
  998. supported workstation types to select from, and in the Renderer Subset
  999. of PEX, this concept might be introduced via "renderer classes" that
  1000. can be specified when creating a renderer.  This might, for example,
  1001. allow selection of a ray-tracer to draw a scene, instead of the
  1002. usual polygonal renderer.  In any case, the PEX protocol today probably 
  1003. cannot support hardcopy workstation/renderer types and the SI certainly
  1004. does not implement anything like it.
  1005.  
  1006. Karl Schultz
  1007.  
  1008. -----
  1009. Subject: 17)  Porting from PEX-SI PHIGS to PEXlib
  1010. From: Karl Schultz <kws@fc.hp.com>
  1011.  
  1012. Here is an account (provided by David Friend) of the experience
  1013. of porting a PEX-SI PHIGS application to PEXlib.  As always,
  1014. your mileage may vary, but you can get some ideas of what is
  1015. involved from these notes.
  1016.  
  1017. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1018.  
  1019. I started by doing the following:
  1020.  
  1021.    - Stuff involved in making the decision.
  1022.    - Bought a copy of "PEXlib Programming Manual" by Tom Gaskins.
  1023.    - Printed out a copy of "PEXlib Specification and C Language
  1024.      Binding" by Jeff Stevenson.  (This is a postscript file that
  1025.      comes with X11R6.  It is for PEX version 5.1.  It was written
  1026.      November 5, 1992.  I did not buy the PEXlib reference manual
  1027.      because every store in town that normally stocked it was out.)
  1028.  
  1029.      At this point I went through the source code in my program and,
  1030. using my PHIGS and PEXlib manuals, replaced each structure type and
  1031. function call with the equivalent in PEXlib.  (I commented out the
  1032. three routines that handle picking, exposures, and the X-Windows to
  1033. world coordinates conversion.  I did not need these routines immed-
  1034. iately.)  After fixing errors and warnings generated by the compiler,
  1035. and one bug (to be mentioned shortly), I had a working program, barring
  1036. the missing sections.  In all, it took 30 hours to port the 550 Kbytes
  1037. of source code.  The picking and exposures took another 7.5 hours.
  1038. The XC to WC conversion routine took 7.5 hours; this is the one
  1039. point in the entire port that I had to write new code, rather than
  1040. do a straight forward conversion.
  1041.  
  1042.      The one serious bug I had was this.  Many of the routines require
  1043. that you pass a pointer to the display.  You must pass the one
  1044. returned by XOpenDisplay().  If you pass one returned by XtDisplay()
  1045. you will get an unexplained core dump.  Furthermore, some X and Xt
  1046. routines that worked fine before with the value returned by XtDisplay()
  1047. will now behave incorrectly.  Use the value from XOpenDisplay() instead.
  1048.  
  1049. (KWS: This is probably some sort of bug;  I've written many PEXlib
  1050. programs that obtain the Display variable from XtDisplay().)
  1051.  
  1052.      Completing the port, updating documentation, porting a second
  1053. program of similar size, creating installation disks, installing the
  1054. code in client sites, etc. will probably result in the port taking a
  1055. total of 150 hours.
  1056.  
  1057. (KWS: Port was done on Sun equipment - here are some notes:)
  1058.  
  1059.    - You may use shared library /usr/openwin/lib/libPEX5.so.2 that
  1060.      comes with Solaris.  However, you must provide your own include
  1061.      files.  They may be found in /usr/X11R6/include/X11/PEX5/PEX*.h,
  1062.      or in xc/lib/PEX5/PEX*.h in the uncompiled source distribution
  1063.      for X11R6.  Almost identical include files are provided with
  1064.      X11R5 after you have applied the 22 patches.
  1065.  
  1066.    - If you also use Motif, you may use the shared libraries and
  1067.      include files found under /usr/dt.  Do not use the ones that
  1068.      come with the Software Development Kit.  Programs that are
  1069.      compiled and linked with the SDK versions will not run unless
  1070.      the target computer also has the Motif shared libraries that
  1071.      come with the SDK.
  1072.  
  1073.    - Always use the Display pointer returned by XOpenDisplay() for
  1074.      all PEX, Xt and X routines.  Don't use the one returned by
  1075.      XtDisplay().  (Actually, I had two non-PEXlib routines that
  1076.      insisted on the one returned by XtDisplay(), and would not
  1077.      work with the one returned by XOpenDisplay().)
  1078.  
  1079.    - Your LD_LIBRARY_PATH environment variable must point to the
  1080.      correct shared library directories.  Unlike Solaris v1.1.x,
  1081.      the programs do not appear to know where to look for their
  1082.      shared libraries.  Use command "ldd" to see what shared
  1083.      libraries your program is looking for.
  1084.  
  1085.    - My program exercised PHIGS pretty thoroughly.  However, it did
  1086.      not use most of the new features available in PHIGS PLUS.  It
  1087.      did complicated viewport, etc. transformations.  It did picking,
  1088.      handled exposures, grabbed the images from the server after they
  1089.      were drawn, etc.  It used a fake RGB standard colormap, in which
  1090.      it wrote what every colours it wanted.  This kludge ported without
  1091.      special effort.  All of this translated easily into PEXlib,
  1092.      barring the X-Windows to World coordinates transformation.
  1093.  
  1094.    - Find below the notes I made while porting that relate directly
  1095.      to the PEX-SI to PHIGS conversion.  They are edited to remove
  1096.      some of the notes specific to my program.
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.                        PEX-SI to PEXlib Porting Notes
  1103.  
  1104.  
  1105. Done (in general):
  1106.    - In Imakefile replace "-lphigs" with "-lPEX5".
  1107.    - In Imakefile, for Solaris, add -I../R6_PEX5.
  1108.    - Replace "<phigs/phigs.h>" with "<X11/PEX5/PEXlib.h>".
  1109.    - Replace ppost_struct() and pupd_ws() with PEXRenderNetwork().
  1110.    - Replace pescape() request to wait for PHIGS update with XSync().
  1111.    - PEX cannot handle the value returned by XtDisplay().  It must use
  1112.      the one returned by XOpenDisplay().  Some X and Xt routines have
  1113.      the same problem.  Modify code accordingly.
  1114.    - Redid main.c:xc_to_wc().
  1115.    - Redid main.c:RedrawPHIGS().
  1116.  
  1117.  
  1118. Done (to initialize system and renderers, etc):
  1119.    - In main() replace initializing PHIGS with initialzing PEXlib.
  1120.    - In main() don't tell PHIGS to ignore DC limits.
  1121.    - Put "PEXRenderer renderer" in TargetType.  Initialize to None in main().
  1122.    - In create_workstation():
  1123.         - Remove test to see if workstation is open.
  1124.           Use "Target->renderer != None" in place of "workstation_open".
  1125.         - Remove closing of PHIGS workstation.
  1126.         - Replace section opening PHIGS workstation with the equivalent
  1127.           for opening a PEX renderer.
  1128.    - Add global values RendererDefaults and RendererDefaultMask.
  1129.    - Replace pclose_ws() with PEXFreeRenderer().
  1130.    - Deleted pclose_phigs().
  1131.  
  1132.  
  1133. Done (to update colour tables):
  1134.    - Replace "Pcolr_rep" with "PEXColorSpecifier".
  1135.    - Use the new member values in Target->ColourMap for read_file()
  1136.      and scale_image(); ColourMap in read_tiff_image(), write_tiff_image()
  1137.      and colour_to_bw(); rgb in create_workstation(); and colr in
  1138.      set_palette().
  1139.    - In create_workstation() call PEXSetTableEntries() in place of
  1140.      pset_colr_rep().
  1141.    - In main() create colour table and colour approximation table.
  1142.      Initialize the colour approximation table.
  1143.    - Move initializing colour table from create_workstation() to main().
  1144.  
  1145.  
  1146. Done (to update generating structures);
  1147.    - In main(), when calling PEXInitialize, make sure that the server
  1148.      supports structures.
  1149.    - Replace pempty_struct() with PEXDeleteElements().
  1150.    - Remove all calls to popen_struct() and pclose_struct().
  1151.    - In main() create the PEX structures.
  1152.    - In main(), at end, don't call punpost_all_structs(), do delete all
  1153.      PEX structures.
  1154.    - Replace pexec_struct() with PEXExecuteStructure().
  1155.    - Replace pset_line_colr_ind() with PEXSetLineColorIndex().
  1156.    - Replace "Ppoint3" with "PEXCoord".  (The members are the same.)
  1157.    - Got rid of "Ppoint_list3".
  1158.    - Replace ppolyline3() with PEXPolyline().
  1159.    - Replace pset_int_colr_ind() with PEXSetSurfaceColor().
  1160.    - Replace pfill_area_set3() with PEXFillArea().
  1161.    - Delete calls to pinq_edit_mode(), pset_edit_mode(), pset_edge_flag()
  1162.      and pset_linetype().  They were all setting values to the defaults.
  1163.    - Replace pset_int_style() with PEXSetInteriorStyle().
  1164.    - Replace pset_linewidth() with PEXSetLineWidth().
  1165.    - Replace pset_text_colr_ind() with PEXSetTextColor().
  1166.    - Replace pset_char_ht() with PEXSetCharHeight().
  1167.    - Replace ptext3() with PEXText().
  1168.    - Replace pset_text_align() with PEXSetTextAlignment().
  1169.  
  1170.  
  1171. Done (to update picking):
  1172.    - Replace padd_names_set() with PEXAddToNameSet().
  1173.    - Replace premove_names_set() with PEXRemoveFromNameSet().
  1174.    - In main() add and initialize a pick filter for the renderer defaults.
  1175.    - In main(), at end, free the pick filter name set resources.
  1176.    - Change "Ppick_path_elem" to "PEXPickElementRef".  Change members
  1177.      struct_id, pick_id and elem_pcs to sid, pick_id and offset.
  1178.    - Change "Ppick_path" to "PEXPickPath".  Change members depth and
  1179.      path_list to count and elements.
  1180.    - Replace pescape() request to do picking with PEXPickOne().
  1181.    - Replace pinq_elem_type_size() and pinq_elem_content() with
  1182.      PEXFetchElements() and PEXDecodeOCs().
  1183.  
  1184.  
  1185. Done (to update views):
  1186.    - Create a separate view table for each PEX renderer.
  1187.    - Replace pset_view_ind() with PEXSetViewIndex().
  1188.    - Replace pset_view_rep3() with PEXSetTableEntries().
  1189.    - Replace pset_ws_vp3() and pset_ws_win3() with PEXChangeRenderer()
  1190.      with mask = PEXRAViewport | PEXRANPCSubVolume.
  1191.    - Replacae peval_view_ori_matrix3() with PEXViewOrientationMatrix().
  1192.    - Replace Pview_rep3 with PEXViewEntry.  (The members have changed.)
  1193.    - Replace peval_view_map_matrix3() with PEXViewMappingMatrix().
  1194.  
  1195.  
  1196. Done (to update modelling transformations):
  1197.    - Replace "Pmatrix3" with "PEXMatrix".
  1198.    - Replace "Pvec3" with "PEXVector".  Change members from delta_x,
  1199.      delta_y and delta_z to x, y and z.
  1200.    - Replace ptranslate3() with PEXTranslate().
  1201.    - Replace pscale3() with PEXScale().
  1202.    - Replace protate_x() and protate_y() with PEXRotate().
  1203.    - Repalce pcompose_matrix3() with PEXMatrixMult().
  1204.    - Replace pset_local_tran3() with PEXSetLocalTransform().
  1205.    - Replace ptran_point3() with PEXTransformPoints().
  1206.  
  1207. -----
  1208. Subject: 18)  Using PHIGS with PEX servers w/o the Workstation Subset
  1209. From: Karl Schultz <kws@fc.hp.com>
  1210.  
  1211. Some PEX vendors (HP, and now Sun) do not support the PHIGS
  1212. Workstation Subset in their PEX servers.  Is it still possible
  1213. to use the PEX-SI PHIGS API with these servers?
  1214.  
  1215. The answer is YES, if you set the right environment variable.
  1216.  
  1217. The environment variable is PEX_SI_API_CLIENT_SS.
  1218.  
  1219. If you set it to a non-zero value, the PHIGS API will not use the
  1220. PHIGS workstation subset in the PEX server and send the data in
  1221. immediate mode to the server.
  1222.  
  1223. Note that this has obvious performance implications if you are
  1224. running your application over a network, but if running locally,
  1225. the difference may not be noticable.
  1226.  
  1227. -----
  1228. Subject: 19)  OReilly's Program! (BadMatch error in first.c)
  1229. From: kws@fc.hp.com (Karl Schultz)
  1230. Date: 1 Dec 1995 01:42:57 GMT
  1231. Organization: Hewlett-Packard Fort Collins Site
  1232. Lines: 59
  1233. Message-ID: <49lmj1$lfa@fcnews.fc.hp.com>
  1234. References: <49l2jv$37d@ef2007.efhd.ford.com>
  1235. NNTP-Posting-Host: manfred.fc.hp.com
  1236.  
  1237. In article <49l2jv$37d@ef2007.efhd.ford.com>, nramabad@pt0308.pto.ford.com (Narayanan Ramabadran (R)) writes:
  1238. > Hi Everyone!
  1239. > I know i have been bugging some of you these past few days as to try and
  1240. > figure out why my "first.c" was not working on the sun solaris.
  1241. > I have figured out what the problem is.......
  1242.  
  1243. Maybe I'll add this to the FAQ.
  1244.  
  1245. > Here goes:
  1246. > the rest of the programs  use the functions given is "book_utils.c" where
  1247. > there is no bug... On the other hand, in the "first.c" the function call
  1248. > to XCreateWindow misses one of the parameters (in the calling function!).
  1249. > To be specific, the "CWBorderPixel" is missing... I added this and BINGO!
  1250. > it works fine..... i am feeling sick that i have been scratching my heaD
  1251. > over this for the last week or so!!! 
  1252.  
  1253. If anyone wants to understand WHY, please read:
  1254.  
  1255. In the failing environment, Sun, in this case, the example program was
  1256. apparently trying to create a window that was of different (deeper) depth
  1257. than the parent.  This is fairly common on servers that support both
  1258. 8 and say, 24 bit deep visuals.  The root window is usually 8 bit
  1259. and X clients can create 24-bit deep windows if they want.
  1260. When a client creates a window, the window usually inherits all its attributes
  1261. from the parent, unless they are overridden by parameters and supplied
  1262. window attrubutes.  In this case, the 24-bit window tried to inherit
  1263. the 8-bit parent's BorderPixel attribute.  A pixel for an 8-bit drawable
  1264. cannot be logically converted for use in a 24-bit drawable, so this
  1265. attribute MUST be supplied/overriden when creating a window of different
  1266. depth than its parent.
  1267.  
  1268. This is a very common error that traps a lot of people.
  1269.  
  1270. > But with the same error, it works from the IBM RS/6000... 
  1271.  
  1272. Probably because the IBM machine didn't support visuals of more than
  1273. one depth.
  1274.  
  1275. > Karl: thanks for the mail you sent me.. i was trying to figure out what
  1276. > the border and background pixel values were (as per your advice) and that's
  1277. > when i noticed this!!!!!
  1278.  
  1279. I sent that to you because that is what I thought was causing the problem! :-)
  1280.  
  1281. > the book (pexlib prog. manual) also has the error... (i think its an error,
  1282. > but if it's not, please correct me)..
  1283.  
  1284. Yeah, technically it probably is an error.
  1285.  
  1286. The book_utils are probably more robust than the same type of code in
  1287. first.c.  The first.c program was trying to get folks started without
  1288. a lot of other distractions.  It is also possible that the bug was
  1289. discovered and fixed by somebody who didn't realize that first.c did not
  1290. include book_utils, so they assumed that fixing book_utils would fix the
  1291. entire set, which was *almost* a correct assumption.
  1292.  
  1293. Note that the problem is not strictly related to PEX.  You can get in the
  1294. same hole with an Xlib application.
  1295.  
  1296.  
  1297.