Next: 5 Example: Three Kinds Up: 4 Design Features Previous: 4.11.1 Integration in X

4.12 API not Protocol

PEX is primarily specified as a network protocol; PEXlib is a presentation of that protocol through an API. OpenGL, on the other hand, is primarily specified as an API; the API is encoded in a specified network protocol when OpenGL is embedded in a system (like X) that requires a protocol. One reason for this preference is that an applications programmer works with the API and not with a protocol. Another is that different platforms may admit different protocols (X places certain constraints on the protocol employed by an X extension, while other window systems may impose different constraints). This means that the API is constant across platforms even when the protocol cannot be, thereby making it possible to use the same source code (at least for the OpenGL portion) without regard for any particular protocol. Further, when the client and server are the same computer, OpenGL commands may be transmitted directly to a graphics subsystem without conversion to a common encoding.

Interoperability between diverse systems is not compromised by preferring an API specification over one for a protocol. Tests in which an OpenGL client running under one manufacturer's implementation was connected to another manufacturer's OpenGL server have provided excellent results.


segal@asd.sgi.com
Fri Sep 23 17:28:42 PDT 1994