home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / documents / OpenGL / analysisPEX next >
Encoding:
Text File  |  1994-08-02  |  35.8 KB  |  782 lines

  1.  
  2.  
  3.  
  4.  
  5.              Analysis of PEX 5.1 and OpenGL 1.0
  6.  
  7.  
  8.  
  9.                  Allen Akin
  10.  
  11.               Silicon Graphics Computer Systems
  12.                    August 3, 1992
  13.  
  14.  
  15.  
  16.  
  17.  
  18. 1.  Introduction
  19.  
  20. PEX and OpenGL are two 3D graphics systems contending for the position
  21. of de facto standard in the workstation market. While they are similar
  22. in many ways, they also differ in important aspects of their
  23. application programming interfaces, functionality, performance,
  24. portability, openness, and responsiveness to changes in markets and in
  25. technology.
  26.  
  27. To our knowledge, no detailed comparisons of PEX and OpenGL have been
  28. published. Perhaps this is because the two systems are evolving and few
  29. individuals have experience with both. With the release of PEX 5.1 and
  30. OpenGL 1.0, we believe the systems are relatively stable and it is now
  31. time to undertake a comparison.
  32.  
  33. This paper analyzes some of the significant differences between PEX and
  34. OpenGL, with attention to issues faced by users as well as
  35. implementors. We hope it will be a positive contribution to the
  36. debate.
  37.  
  38.  
  39.  
  40. 2.  Programming Interfaces
  41.  
  42. There is an essential difference in scope between PEX and OpenGL:
  43.  
  44.     OpenGL is an application programming interface. The OpenGL
  45.     specification defines the data structures and procedure calls
  46.     application programs must use to produce graphical output, as
  47.     well as the semantics of the drawing process.
  48.  
  49.     PEX is a wire protocol. That is, PEX specifies how graphics
  50.     requests are to be encoded (as if for transmission over a
  51.     network), and what the semantics of those encoded requests must
  52.     be.
  53.  
  54. PEX does not specify an application programming interface. One of the
  55. primary goals of PEX is efficient support for PHIGS. The original PEX
  56. designers planned to use the ANSI and ISO programming language bindings
  57. for PHIGS, and they explicitly refused to define a competing API. Their
  58. decision was reflected in the name PEX, which is often said to be an
  59. acronym for PHIGS Extensions to X.
  60.  
  61. This choice generated considerable controversy. Although PHIGS has the
  62. advantages of international standardization and an existing software
  63. base, it is quite complex and some software developers have claimed
  64. that using it would force them to restructure their applications. (For
  65. example, standard PHIGS lacks support for immediate-mode graphics.) As
  66. a result, many PEX proponents favor the use of a "PEXlib" which would
  67. expose the PEX protocol more completely. The X Consortium has proposed
  68. such an interface. It offers greater device-specific control and in
  69. many cases better performance than PHIGS. However, it also exposes PEX
  70. implementation dependencies (such as subsets) that must be handled by
  71. special-case code in applications rather than in the API.
  72.  
  73. The deficiencies of PHIGS and PEXlib have led to proposals for
  74. additional PEX-compatible APIs. While supporting a variety of APIs
  75. improves the chance that at least one will be appropriate for any given
  76. application, the proliferation of interfaces has slowed the acceptance
  77. of PEX. Many hardware vendors and software developers have chosen to
  78. wait for one API to dominate, rather than risk investing in one that
  79. fails. The possibility that incompatible protocol changes in PEX 6.0
  80. will force incompatible API changes in PEXlib has also caused concern.
  81.  
  82. The situation with OpenGL is much simpler. There is a single
  83. well-defined OpenGL API. To guarantee interoperability in heterogeneous
  84. networks, there is an OpenGL extension (GLX) and wire protocol for use
  85. with the X Window System. In other environments (e.g. Microsoft
  86. Windows) where currently there is no need for a wire protocol, OpenGL
  87. has none.
  88.  
  89. In recent months some in the PEX community have advanced the view that
  90. the PEX protocol is a general-purpose foundation for supporting all 3D
  91. graphics APIs. IRIS GL is arguably the market-leading API for 3D, but
  92. PEX 5.1 is missing functionality that is crucial for supporting it.
  93. (See below.) In contrast, it has been demonstrated that GL has
  94. sufficient functionality to support PHIGS because there are commercial
  95. PHIGS implementations built on IRIS GL.  Furthermore, IRIS GL has also
  96. been used to support higher-level APIs including IRIS Inventor, IRIS
  97. Explorer, and Ithaca Software's HOOPS. These examples lead us to
  98. believe that the GLX protocol is actually a better candidate than PEX
  99. to support a wide variety of APIs on an equal footing.
  100.  
  101.  
  102.  
  103. 3.  Functionality
  104.  
  105. It is difficult to compare PEX and OpenGL functionality because of a
  106. major difference in design philosophy:
  107.  
  108.     Nearly all PEX functionality is optional: it is not present in
  109.     all PEX subsets, or some aspect of it is
  110.     "implementation-dependent." The PHIGS API or PEXlib-based
  111.     applications must query the PEX extension before using any
  112.     implementation-dependent feature, and adjust their behavior
  113.     accordingly. For example, a PEX implementation might include
  114.     just the "PHIGS Workstation" subset, and thus be incapable of
  115.     immediate-mode rendering.  Alternatively, it might include just
  116.     the "Immediate Rendering" subset, and thus be incapable of
  117.     anything else!  As another example, PEX provides an interface
  118.     to select Phong shading, but there is no requirement that Phong
  119.     shading actually be supported (and to our knowledge, no current
  120.     implementations of PEX support it).  In short, it is not easy
  121.     to say precisely what functionality PEX includes, because it
  122.     varies so much from implementation to implementation.
  123.  
  124.     In contrast, all OpenGL implementations are required to support
  125.     all the functionality described in the specification. Even the
  126.     advanced rendering features are guaranteed to be present.
  127.  
  128. Despite this fundamental difficulty, some functionality comparisons can
  129. be made, and in such areas it is important to understand the
  130. differences between the two systems. Some examples follow.
  131.  
  132. 3.1.  Text
  133.  
  134. PEX has extensive support for text, including a PEX font mechanism that
  135. is independent of X Window System fonts. (Access to X11 fonts is
  136. optional.) Ordinary PEX stroke-precision text is derived from a vector
  137. font, and is fully 3D-transformable.
  138.  
  139. OpenGL provides routines that convert fonts from its environment (the X
  140. Window System or Microsoft Windows) into OpenGL display lists. The only
  141. font mechanism is that provided by the environment. If the original
  142. fonts are in outline form (e.g. TrueType), then the display lists will
  143. contain fully transformable geometry. If the original fonts are in
  144. bitmap form, then the display lists will contain bitmaps.
  145.  
  146. PEX has the advantage that a fully transformable vector font is always
  147. available. OpenGL has the advantage that it guarantees all of the
  148. environment's existing fonts may be used, and there is no need to
  149. create, license, or distribute new fonts specifically for 3D.
  150.  
  151. 3.2.  Display List Editing
  152.  
  153. Both PEX and OpenGL are used in networked environments, where it may be
  154. expensive to transport drawing requests from the client application to
  155. the graphics server. Both provide a server-side storage mechanism
  156. (called "display lists" in OpenGL, "structure store" in PEX) that
  157. allows applications to cache drawing requests on the server and avoid
  158. transport costs for requests that are reused.
  159.  
  160. PEX supports nearly all of the PHIGS structure store editing
  161. functionality, including the ability to label sections of structures;
  162. insert, replace, or delete elements of structures; copy structures; and
  163. search through structures according to labels, hierarchical
  164. organization, or spatial position of the primitives in the structures.
  165.  
  166. OpenGL display lists may only be created, replaced, and deleted.
  167. However, these operations can be performed on structures with very fine
  168. granularity. For example, in OpenGL it is possible to create display
  169. lists containing the data for independent vertices of a polygon, and to
  170. define the polygon as a set of calls to those display lists.  A given
  171. vertex of the polygon may then be "edited" by replacing its display
  172. list. This is not possible in PEX; individual vertices cannot be
  173. edited, and primitives must be replaced in their entirety. (See
  174. Performance below for some consequences of this difference.)
  175.  
  176. 3.3.  Complex Polygons
  177.  
  178. Both OpenGL and PEX support single- and multi-contour polygons with
  179. convex and nonconvex shapes. PEX supports self-intersecting contours
  180. and polygon lists with shared geometry, while OpenGL does not.
  181.  
  182. 3.4.  Feedback
  183.  
  184. OpenGL has provisions for tapping the graphics pipeline, so that the
  185. results of geometric transformations and lighting computations can be
  186. "fed back" to the application. PEX has no analogous capability.
  187.  
  188. 3.5.  Alpha Blending
  189.  
  190. OpenGL supports an alpha (coverage) buffer and an explicit alpha
  191. component in colors. These are used for antialiasing and image
  192. composition. PEX does not support alpha blending.
  193.  
  194. 3.6.  Image Operations
  195.  
  196. OpenGL includes routines to read, write, and copy pixels. These
  197. routines may be directed to the framebuffer or to bitmap data
  198. structures in the application. A number of operations including
  199. scaling, luminance transformations, and type conversion may be applied
  200. to the pixel data as it is moved. This functionality can be used to
  201. implement ordinary 2D raster operations, but is also used to render
  202. text and is needed to support image manipulation for texture mapping.
  203.  
  204. PEX has no support for image operations.
  205.  
  206. 3.7.  Texture and Environment Mapping
  207.  
  208. OpenGL includes a complete implementation of texture mapping. The
  209. application controls the exchange of rendering time for image quality,
  210. and it may use its own texture prefiltering if that provided by OpenGL
  211. is inadequate. Texture coordinates may be specified explicitly or
  212. generated automatically, and they may be transformed by an arbitrary
  213. 4x4 matrix. Textures may be applied to a surface as if they were
  214. decals, or they may be blended with the surface in a number of ways.
  215.  
  216. PEX has no equivalent capability.
  217.  
  218. 3.8.  Antialiasing
  219.  
  220. PEX has no official support for antialiasing. Some implementations have
  221. provided it as a nonstandard extension.
  222.  
  223. OpenGL has explicit support for antialiasing points, lines, and
  224. polygons. In addition, the accumulation buffer may be used to implement
  225. full-scene antialiasing.
  226.  
  227. 3.9.  Progressive Refinement
  228.  
  229. The OpenGL accumulation buffer permits straightforward implementation
  230. of progressive refinement, the gradual improvement of image quality
  231. over a period of time. PEX has no equivalent.
  232.  
  233. 3.10.  Capping Planes
  234.  
  235. OpenGL supports a multipass capping-plane algorithm using its stencil
  236. buffer and other auxiliary buffers.  PEX as currently defined cannot
  237. support this functionality.
  238.  
  239. 3.11.  Constructive Solid Geometry
  240.  
  241. The OpenGL stencil, accumulation, and auxiliary buffers can be used to
  242. render objects defined by the regularized Boolean operations of
  243. constructive solid geometry. PEX does not have this ability.
  244.  
  245. 3.12.  Motion Blur
  246.  
  247. The OpenGL accumulation buffer can be used to simulate motion blur. PEX
  248. has no support for it.
  249.  
  250. 3.13.  Depth-of-Field
  251.  
  252. With appropriate change in viewing parameters, the OpenGL accumulation
  253. buffer can be used to produce an image with finite depth-of-field. This
  254. function is not available in PEX.
  255.  
  256.  
  257.  
  258. 4.  Performance
  259.  
  260. Interactive 3D graphics demands much higher performance than 2D
  261. graphics, and therefore affects more aspects of system design. The
  262. architecture of a successful 3D graphics system must encompass not only
  263. 3D transformations, shading, and scan conversion, but also CPU load,
  264. cache behavior, main memory bandwidth requirements, main memory
  265. capacity requirements, bus transaction latency and throughput, address
  266. translation costs, and graphics processor request queueing, among other
  267. things. These issues must be considered for the graphics software,
  268. operating system, window system, and even the applications programs.
  269.  
  270. There are numerous existence proofs that both PEX and OpenGL can
  271. support high-performance implementations.  However, the two systems do
  272. not place equal emphasis on some of the design issues mentioned above.
  273. We believe that these differences in design would lead to differences
  274. in performance should PEX and OpenGL be implemented on the same
  275. hardware, and we believe that trends in semiconductor technology will
  276. tend to widen the performance gap.
  277.  
  278. 4.1.  Data Reformatting
  279.  
  280. It is nearly always necessary for applications to maintain private data
  281. structures that are specialized for their particular problem domains.
  282. Graphics data is just one component of these structures.
  283.  
  284. Current PEX APIs (and the PEX protocol) use their own data structures
  285. for describing graphics primitives. For example, a polygon consists of
  286. a counted list of vertices, each of which contains coordinates in
  287. floating-point format, plus optional data such as colors and surface
  288. normals.
  289.  
  290. When an application wishes to make an immediate-mode graphics request,
  291. it must extract data from its private data structures, reformat it to
  292. match the PEX interface requirements, write it to a temporary buffer,
  293. and then invoke the PEX API to process it. This has several
  294. consequences:
  295.  
  296.     The CPU must spend cycles to reformat and copy the data. These
  297.     cycles do no useful work, yet they are lost to the application
  298.     and to other processes in the system that might have made use
  299.     of them. Furthermore, since they are in application code
  300.     outside the scope of the graphics system, no improvement in the
  301.     graphics hardware or software can recover the loss.
  302.  
  303.     For high-performance interactive 3D graphics applications,
  304.     where a considerable amount of data must be processed for each
  305.     frame, the reformatting process sweeps the system's data cache
  306.     repeatedly. This can drastically reduce the effectiveness of
  307.     the cache, and thus degrade performance for the entire
  308.     workstation.
  309.  
  310.     During reformatting, the CPU is generating memory transactions
  311.     at a high rate. The bus traffic resulting from these
  312.     transactions interferes with other users of the system bus. One
  313.     critical user of the bus that may be adversely affected by this
  314.     traffic is the graphics processor.
  315.  
  316. To quantify this problem, consider a hypothetical workstation
  317. (simplified, but similar to many in use today). It has a 32-byte cache
  318. line, a 64-bit-wide bus to memory, and main memory with a 240ns
  319. random-access cycle time and an 80ns page-mode-access cycle time. A
  320. cache line occupies four sequential addresses, so it can be read in
  321. (240ns + 80ns + 80ns + 80ns), or 480ns. We'll ignore the cost of
  322. reformatting. Writing the cache line to memory takes another 480ns.
  323. Therefore we can copy 32 bytes in a total of 960ns, for an average copy
  324. rate of 33MB/s. An independent 3D triangle is composed of three
  325. vertices, each having three coordinates, three color components, and
  326. three surface normal components. If all of these are specified by
  327. single-precision floating-point values, then the total size of the
  328. triangle is 108 bytes. Therefore our 33MB/s copy rate is sufficient to
  329. copy a little more than 300K triangles per second. At this rate, our
  330. workstation is completely saturated by the data reformatting process;
  331. there is no time for drawing the triangles, much less running the
  332. application. This maximum performance level is already below the target
  333. drawing rate for comparable machines that exist today. And any
  334. additional reformatting or copying (for example, to build PEX protocol
  335. packets) reduces the maximum drawing rate still further.
  336.  
  337. OpenGL uses a different approach. The OpenGL API allows graphics data
  338. to be extracted directly from the application's private data
  339. structures, without reformatting. It is also possible to support this
  340. interface in hardware in such a way that the data need never be
  341. transferred into the CPU, so it will not sweep the CPU's cache.  This
  342. is impractical for PEX on the hardware with which we are familiar.
  343.  
  344. For years, CPU cycle times have improved more rapidly than main memory
  345. cycle times. We expect this trend to continue, with the result that
  346. PHIGS and PEXlib-style APIs (as well as any new PEX APIs that reformat
  347. data to build PEX protocol packets) will become increasingly limited by
  348. memory access. Since so many cycles will be spent copying data, systems
  349. based on PEX will need to be faster and more expensive to sustain the
  350. same overall level of application performance as systems based on
  351. OpenGL.
  352.  
  353. 4.2.  Data Duplication
  354.  
  355. There are two ways developers of PEX-based applications can avoid the
  356. dilemma described in the previous section. The first is to rewrite all
  357. data-structure-handling code so that the graphics data is stored in
  358. precisely the form required by PHIGS or PEXlib. In the extreme this
  359. involves dispensing with private data structures entirely, i.e. using
  360. PEX structure store for all graphics data and PEX structure extensions
  361. ("GSEs") for private non-graphics data. Not only would this force
  362. applications to be rewritten, but it would also require the use of
  363. interprocess (and sometimes network) communication to access the
  364. application database. In any case, eliminating the application's
  365. specialized data structures is usually not feasible, since those
  366. structures are instrumental in providing the added value that makes the
  367. application successful commercially.
  368.  
  369. The second approach is to duplicate the graphics data, keeping a copy
  370. in the proper form for a PEX API. This can be done by maintaining
  371. parallel data structures in the application or in PEX structure store.
  372. In practice, we have found that these methods rarely work. In the case
  373. where the graphics data is static, and well-separated from other
  374. application data, maintaining a parallel graphics database can be
  375. effective. Usually, though, the graphics data is being referenced
  376. frequently, is edited, or is intermixed with other data. In such cases
  377. maintaining parallel data structures causes the real memory
  378. requirements of the application to expand dramatically.  Typical
  379. CAD/CAM graphics databases are 20MB-40MB in size today, and are
  380. expected to grow. Customers are reluctant to purchase that much real
  381. memory to add to their systems, especially if they know that it is only
  382. being used for duplicated data! Applications developers are reluctant
  383. to add the code needed to keep the duplicated data in sync with the
  384. main database.
  385.  
  386. OpenGL avoids all of these problems by making it unnecessary to
  387. duplicate or reformat graphics data.
  388.  
  389. 4.3.  Display Lists
  390.  
  391. Once a PEX structure is created, it may be edited by inserting or
  392. deleting new structure elements. Once an OpenGL display list is
  393. created, it may only be deleted or replaced; it may not be edited.
  394.  
  395. OpenGL makes this restriction to allow its display lists to be
  396. "compiled" into a more efficient form at the time they are created.
  397. This is particularly effective for entities like texture maps and
  398. material definitions that may involve a significant amount of
  399. preprocessing. It can also be used to perform data type and format
  400. conversions, or to move drawing requests into special display list
  401. memory for fast access by the graphics hardware.
  402.  
  403. PEX structures may be compiled, too. However, because they are
  404. editable, a number of complications arise.  For example, since there is
  405. no provision in PEX for "opening" and "closing" a structure, the PEX
  406. extension cannot determine when edits to a structure are complete.
  407. Recompiling a structure after each edit could be a great waste of time,
  408. since another edit might arrive shortly thereafter. To avoid this,
  409. recompilation must be delayed until the structure is actually invoked.
  410. This increases implementation complexity and on systems with graphics
  411. accelerator hardware it can increase overhead in the "fast path" case
  412. for drawing.
  413.  
  414. Another issue arises when a PEX structure is in main memory, and the
  415. graphics hardware accesses it by DMA.  Since a given structure may be
  416. read by the graphics hardware and written by the structure editor at
  417. the same time, access to it must be interlocked. This interlock must be
  418. fairly fine-grained; one cannot simply lock out edits until structure
  419. traversal is completed, because the PHIGS model for graphics requires
  420. support for continuous traversal and "pending" edits. Usually the
  421. structures being changed are precisely those that need to be accessed
  422. by the graphics hardware to update the display, so conflicts are
  423. frequent. Furthermore the required locks are interprocessor locks, so
  424. they are expensive on many machines.
  425.  
  426. On a machine with a similar architecture, OpenGL display lists would
  427. also require interlocks. However, the interlocks are needed for just
  428. three operations (display list replacement and deletion must be
  429. interlocked with display list lookup), and continuous traversal is not
  430. an issue. Fewer synchronization operations are needed than for PEX, and
  431. the critical sections complete more quickly (often in a single
  432. instruction).
  433.  
  434. 4.4.  Display List Editing Granularity
  435.  
  436. PEX structures are edited by inserting, deleting, or replacing
  437. "structure elements," which consist of geometric primitives or
  438. attribute-setting commands. Thus PEX structure editing can be applied
  439. to individual primitives, but not to any entity at a finer
  440. granularity.  This can cause performance problems when editing large
  441. primitives.  For example, to change the location of one vertex in a
  442. large quadrilateral mesh, the entire mesh must be re-transmitted to the
  443. server. In many cases this eliminates the advantage of PEX structure
  444. store.
  445.  
  446. As noted above in Functionality, OpenGL display lists may invoke other
  447. display lists even within a single primitive. Although display lists
  448. may not be edited, they may be replaced. Together these two features
  449. allow primitives to be edited at a very fine granularity. For example,
  450. a quadrilateral mesh can be defined as a set of calls to display lists
  451. that define its individual vertices. Replacing the display list for a
  452. vertex effects a vertex-level edit. Only the data for the new vertex
  453. need be transmitted to the server.
  454.  
  455. 4.5.  State Save and Restore
  456.  
  457. PEX semantics require that all rendering pipeline attributes be saved
  458. when a structure is traversed, and restored when the traversal is
  459. completed. This demands an expensive "push and pop" of the complete
  460. state, or a complex copy-on-write scheme that adds cost to
  461. attribute-setting commands.
  462.  
  463. OpenGL state is saved and restored selectively, and only when the
  464. client application requests it, so the process can be optimized or even
  465. eliminated if it is not needed.
  466.  
  467. 4.6.  Indirect Attributes
  468.  
  469. In PEX, attributes like the color and style of a primitive may be
  470. stored in "bundles." A flag associated with each primitive determines
  471. whether that primitive's attributes are provided directly (along with
  472. the geometry for the primitive) or indirectly (from a bundle). In
  473. immediate-mode drawing the flag must be tested, and that slows down the
  474. fast drawing path for the primitive. In both immediate and structure
  475. modes, the use of the bundle forces a memory access to a nonsequential
  476. address, which often causes a TLB miss or a random-access penalty for
  477. the memory subsystem. Since the bundle tables may be large, they cannot
  478. always be stored on the graphics subsystem; this makes it difficult to
  479. optimize the graphics pipeline for some important cases (like polygons,
  480. where the style of the primitive has a substantial effect on the
  481. computations needed to display it).
  482.  
  483. OpenGL pushes attribute lookup back to the level of the application, so
  484. the cost of indirection is incurred only when it is strictly
  485. necessary.  The display list mechanism can be used to implement
  486. attribute indirection straightforwardly, for arbitrary sets of
  487. attributes.
  488.  
  489.  
  490.  
  491. 5.  Portability
  492.  
  493. The single most important reason to standardize a graphics system is to
  494. guarantee portability for the applications that are based on it. PEX
  495. and OpenGL may well succeed or fail depending on how effectively their
  496. APIs and wire protocols support this goal.
  497.  
  498. 5.1.  Subsetting
  499.  
  500. PEX has three mutually-incompatible subsets: immediate-mode,
  501. structure-mode, and "PHIGS Workstation." Vendors of PHIGS for PEX must
  502. provide three significantly different implementations layered on these
  503. subsets to insure network transparency and application portability. A
  504. single PEXlib is sufficient to support all three subsets, but at the
  505. cost of pushing portability issues all the way up into the
  506. application.  Real software portability does not yet exist in the PEX
  507. world because of the wide variations in commercial versions of PEX.
  508.  
  509. The existence of these PEX subsets may be indicative of the difficulty
  510. of building a full PEX implementation. If true, this has negative
  511. implications for the quality, availability, and timeliness of PEX.
  512.  
  513. In order to combat application portability problems caused by
  514. subsetting and optional functionality, a group of PEX vendors has found
  515. it desirable to fund a private organization, the PEX Interoperability
  516. Center, just to provide a PEX porting and testing environment.
  517.  
  518. OpenGL may not be subsetted. Application developers can be assured that
  519. all OpenGL features will be available on all implementations. Unlike
  520. PEX today, there exists an OpenGL sample implementation with complete
  521. functionality. The need for interoperability testing is greatly reduced
  522. because OpenGL implementations are much more consistent than PEX
  523. implementations.
  524.  
  525. 5.2.  Optional Functionality
  526.  
  527. Many of the features described in the PEX protocol specification are
  528. optional. For example, the protocol contains provisions for scanline
  529. rendering, Phong shading, and CIE LUV color computations, but none of
  530. these features is guaranteed to be available in any particular PEX
  531. implementation. To use any optional feature, an application must query
  532. the server to determine if the feature is available. If not, the
  533. application must include code for a fallback strategy. This approach is
  534. very general, but it yields portable programs only by imposing a large
  535. burden on every application developer.
  536.  
  537. In contrast, OpenGL has a much larger set of core features that are
  538. universally supported.
  539.  
  540. 5.3.  Conformance Testing
  541.  
  542. To our knowledge, there are no comprehensive test suites available to
  543. validate PEX implementations. This makes it difficult to determine
  544. whether a particular implementation conforms to the specification. It
  545. also reduces confidence that an application that runs on one
  546. implementation of PEX will also run correctly on another.
  547.  
  548. A suite of conformance tests for OpenGL 1.0 ships with every release
  549. kit.
  550.  
  551. 5.4.  Window-System Dependency
  552.  
  553. PEX as it is defined today is very closely coupled to the X Window
  554. System. The semantics of X resources, drawables,
  555. atomicity/sequentiality requirements, and events are integral to the
  556. design of PEX.
  557.  
  558. However, there are other commercially-significant window systems.
  559. Microsoft Windows is an example. In order to accommodate these systems,
  560. OpenGL separates the parts of the interface that are window-system
  561. dependent (about ten routines under X11) from those that are
  562. window-system independent. Adding a small new set of window-system
  563. dependent routines allows the remainder of OpenGL to be used without
  564. change.  This capability is being exploited to port OpenGL to Microsoft
  565. Windows/NT, with the expectation that Windows/NT platforms will offer a
  566. large new market for 3D graphics applications.
  567.  
  568.  
  569.  
  570. 6.  Business Issues
  571.  
  572. Although the primary focus of this paper is on the technical
  573. differences between PEX and OpenGL, it is also necessary to consider
  574. the most critical business issues: licensing, processes for changing
  575. the systems, market acceptance, and availability.
  576.  
  577. 6.1.  Licensing
  578.  
  579. The PEX specifications and sample implementation are available as part
  580. of the X11 distribution, at no additional fee. Vendors may release
  581. their commercial-quality implementations of PEX as bundled or layered
  582. products without royalty. To cover costs, the members of the X
  583. Consortium make direct financial contributions for support of X and
  584. PEX; for example, the PEX Sample Implementation cost contributors a
  585. total of roughly $750K.
  586.  
  587. Anyone can license OpenGL from Silicon Graphics at nominal prices.
  588. Manual pages are available by anonymous ftp at no cost. A Level 1
  589. license (including the OpenGL specifications, manual pages, C bindings,
  590. GLU utilities, demo applications, compliance suite, and the right to
  591. redistribute an implementation) is $25K. A Level 2 license (all of
  592. Level 1 plus reference implementation, optimized portable sample
  593. implementation, X11 server extension, and porting documentation) is
  594. $100K. (This was chosen to be less than the fully-burdened cost of one
  595. engineer for a year.) A university license is available for $500. There
  596. is a royalty of $5 per revenue copy. These fees allow SGI to recover
  597. expenses for distribution and maintenance of OpenGL, in much the same
  598. way consortium membership fees allow the X Consortium to provide
  599. maintenance for PEX.
  600.  
  601. 6.2.  Mechanisms for Change
  602.  
  603. In the case of PEX, multiple independent entities (ANSI, ISO, the
  604. PHIGS-PLUS committee, and the X Consortium) are responsible for
  605. defining various parts of the APIs, rendering semantics, and wire
  606. protocol. This has led to some problems of timeliness and
  607. compatibility, particularly with respect to PEX support for PHIGS-
  608. PLUS. It has also contributed to the proliferation of PEX APIs.
  609. However, the process is open to essentially anyone.
  610.  
  611. A single organization (Silicon Graphics) defined the original
  612. specification for OpenGL, and a single entity (the OpenGL Architecture
  613. Review Board) is now responsible for all aspects of the API and wire
  614. protocol. The bylaws ensure that each of the six companies on the ARB
  615. has an equal vote on all API and governance issues.  All decisions
  616. require a two-thirds majority vote. Compared to the organization used
  617. by PEX, we believe this structure will be more responsive to the needs
  618. of OpenGL users and more likely to maintain the technical integrity of
  619. the design as it evolves.
  620.  
  621. SGI has full-time engineering resources assigned to implement the
  622. decisions of the OpenGL ARB. This allows new code to be written and
  623. tested quickly, and thus brought to market earlier or with more
  624. user-requested features. The X Consortium funds two full-time positions
  625. for PEX; other development work is provided by sponsoring companies on
  626. a volunteer basis.
  627.  
  628. 6.3.  Vendor Support
  629.  
  630. Presently we know of five commercial-quality PEX products. Twenty
  631. companies are participating in the PEX Interoperability Center in
  632. Dallas, Texas, and therefore many should be expected to release
  633. commercial PEX products sometime in the next year.
  634.  
  635. Today SGI, IBM, Nth Graphics, and DuPont Pixel Systems are shipping
  636. products compatible with IRIS GL, the predecessor to OpenGL. Twenty
  637. personal computer and workstation companies have licensed OpenGL, and
  638. commercial implementations will be available sometime in the next
  639. year.
  640.  
  641. A considerable number of vendors have stated their intent to support
  642. both PEX and OpenGL.
  643.  
  644. The most compelling difference in vendor support is the endorsement of
  645. OpenGL by Microsoft and Intel. The OpenGL API will be bundled with
  646. future versions of Microsoft's Windows/NT environment, providing appli-
  647. cations based on OpenGL with a personal computer market at least an
  648. order of magnitude larger than the workstation arena.
  649.  
  650. 6.4.  Software Applications Base
  651.  
  652. PEX per se has a small base of applications, because it has not been
  653. widely available until recently. The existing base of PHIGS code, much
  654. of which is found in CAD/CAM, government, and European markets, has a
  655. logical porting path to PEX. PEXlib is an alternate API for developers
  656. who find PHIGS inappropriate, but it requires substantial recoding
  657. because it is essentially a new API. There is some concern that ISVs
  658. will delay ports to PEXlib, because the PEX designers have chosen to
  659. make incompatible changes to the protocol for the next PEX release, and
  660. this could force incompatible changes to the PEXlib interface.
  661.  
  662. IRIS GL has the majority of applications in markets requiring
  663. high-performance 3D graphics - CAD/CAM (particularly finite element and
  664. structural analyses), animation, creative graphics, visual simulation,
  665. and scientific visualization. Since OpenGL is not backward-compatible
  666. with IRIS GL, existing IRIS GL applications must be ported. The
  667. majority of the current base of 1500 IRIS GL applications are expected
  668. to port to OpenGL, given its similarity to IRIS GL, the need to stay
  669. current with SGI and its product release schedule, and the wider mar-
  670. ket that is provided by OpenGL. According to a poll taken at the last
  671. SGI Developers Conference, 85% of the current IRIS GL ISVs have already
  672. decided to port to OpenGL. Because OpenGL evolved from IRIS GL, much of
  673. the conversion process can be automated; SGI demonstration programs
  674. were ported at the rate of 5000 lines per engineer-day. SGI has a
  675. vested interest in simplifying the move from IRIS GL to OpenGL, because
  676. OpenGL is the native interface for future SGI hardware.
  677.  
  678. 6.5.  Availability
  679.  
  680. The PEX 5.1 specification review process will be complete very shortly,
  681. and we can expect PEX 5.1 implementations to be available in the Fall
  682. of 1992.
  683.  
  684. The OpenGL 1.0 specification and sample implementation shipped on June
  685. 30, 1992. The first commercial implementations are expected in the
  686. first quarter of 1993.
  687.  
  688. The PEX design committee has chosen to make the next update of PEX
  689. incompatible with previous versions.  The specification for PEX 6.0
  690. will include some of the advanced rendering features of OpenGL, and
  691. should be complete near the middle of 1993. First implementations could
  692. appear as early as 1994.
  693.  
  694.  
  695.  
  696. 7.  Conclusions
  697.  
  698. We believe diversity in computer graphics interfaces can be desirable
  699. if it encourages real innovation in hardware, system software, and
  700. applications. However, if the computer graphics community feels it must
  701. standardize on one graphics system, OpenGL is a better choice than
  702. PEX:
  703.  
  704.     OpenGL has a single well-defined API. There are two major
  705.     competing APIs for PEX, and one of them (PHIGS) is not under
  706.     the control of the organization defining PEX.
  707.  
  708.     OpenGL has more rendering functionality than PEX. In addition,
  709.     more OpenGL functionality is guaranteed to be present in all
  710.     implementations than is the case for PEX.
  711.  
  712.     When the entire computing system is analyzed, OpenGL has
  713.     several important performance advantages over PEX. These
  714.     advantages apply to both immediate-mode and structure-mode
  715.     rendering.
  716.  
  717.     OpenGL applications can be made portable with less effort than
  718.     is needed for applications based on PEX, because OpenGL
  719.     implementations are more consistent functionally and are
  720.     subject to validation by a conformance test. OpenGL is also
  721.     less dependent on the window system under which it is run.
  722.  
  723.     Both OpenGL and PEX are available on generous terms, and both
  724.     have a good deal of support in the industry.  The X Consortium
  725.     process for defining PEX is more democratic and participatory,
  726.     but OpenGL's governance process will likely result in better
  727.     technology coming to market more quickly.
  728.  
  729.     Both systems offer porting paths from existing code bases: from
  730.     stand-alone PHIGS to PHIGS on PEX, and from IRIS GL to OpenGL.
  731.     However, the initial OpenGL application base will be
  732.     substantially larger.
  733.  
  734.     OpenGL will be a standard part of Microsoft Windows/NT. This
  735.     provides OpenGL applications a vastly larger potential market
  736.     than is available to PEX applications, and will make OpenGL
  737.     more attractive to independent software developers.
  738.  
  739. We welcome your comments and suggestions.
  740.  
  741.  
  742.  
  743. References
  744.  
  745. Goldfeather, Jack, et. al., "Fast Constructive Solid Geometry Display
  746. in the Pixel-Powers Graphics System", Computer Graphics 20:4 (SIGGRAPH
  747. 1986 Conference Proceedings), August, 1986, pp. 107-116.
  748.  
  749. Haeberli, Paul, and Akeley, Kurt, "The Accumulation Buffer: Hardware
  750. Support for High Quality Rendering," Computer Graphics 24:4 (SIGGRAPH
  751. 1990 Conference Proceedings), August, 1990, pp. 309-318.
  752.  
  753. Mammen, Abraham, "Transparency and Antialiasing Algorithms Implemented
  754. with the Virtual Pixel Maps Technique," IEEE Computer Graphics and
  755. Applications, July, 1989.
  756.  
  757. Segal, Mark, and Akeley, Kurt, The OpenGL Graphics System: A
  758. Specification (Version 1.0), June 30, 1992, Silicon Graphics, Inc.
  759.  
  760. Womack, Paula (ed.), PEX Protocol Specification Version 5.1P - X Public
  761. Review Draft, May 11, 1992, Massachusetts Institute of Technology.
  762.  
  763.  
  764.  
  765. The Author
  766.  
  767. Allen Akin is an Engineering Manager in the OpenGL group at Silicon
  768. Graphics. He is currently integrating OpenGL with Microsoft
  769. Windows/NT.  His graphics experience includes a year at MacroMedia,
  770. where he completed the MacroMind Three-D animation system for the
  771. Apple Macintosh, and five years at Digital Equipment Corporation, where
  772. he served as Engineering Manager for the first commercial
  773. implementation of PEX and as Graphics Software Architect for RISC
  774. workstations. He can be reached at the Internet address akin@sgi.com.
  775.  
  776.  
  777.  
  778. Copyright 1992, Silicon Graphics, Inc. All rights reserved.
  779.  
  780.  
  781.  
  782.