Computergraphicslanguage bindings: programmer interface standards Madeleine R Sparks and Julian R Gallop* Two participants of the group developing standard user interfaces to the emerging computer graphics standards describe some general principles that have guided the generation of these "bindings'. In addition, specific exam- ples of critical issues are discussed, including mapping algorithms for names and data types and multitasking. Generic solutions which apply across languages and across computer graphics standards are discussed. The effect on the CAD industry of the standardization of bind- ings is examined, and future trends in programming lan- guages and in implementations are discussed. graphics standards, language bindings, programmer interface standards The Graphical Kernel System (GKS), the first international standard for computer graphics programming, was pub- lished by the International Organization for Stan- dardization (ISO) in 1985 (ISO 7942). This standard pro- vides: • ease of interchange of computer graphics application programs • establishment of a common basis for computer graphics education • guidance for the design of future computer graphics devices However, standard mechanisms to access GKS function- ality from many programming languages are what makes the GKS standard usable. Without these standard mechanisms (bindings), application level interfaces to GKS would be simply reflections of different vendors' interpretations of the functional standard, i.e. different subroutine names, different groupings of subroutines, dif- ferent parameter ordering and types, and so on. It would be difficult to port application software, and the basic concepts provided within the standard would be lost because of the many confusing methods of accessing those concepts. Generally, standard language bindings provide the needed consistency of interpretation and access. Prog- rammers can move their expertise in basic graphics con- cepts, along with their code, among different vendors' interpretation of the same functional standard. To assure this capability, a separate GKS language bindings stan- dard has been defined to be published as a multiple-part document ISO 8651, one part for each programming lan- Unisys, SystemDevelopmentGroup, 1500 PerimeterParkway,Suite 400, Huntsville,AL 35806,USA *RutherfordAppleton Laboratory, Chilton, Didcot, Oxon OXl 1 0QX, UK guage. Part 1 of this standard is the Fortran binding; Part 2 is the GKS binding to Pascal; Part 3 is the Ada binding; and Part 4 is the binding to C. As other languages are iden- tified that require bindings to GKS, they will be added as sequential Parts. Currently, the GKS Fortran binding has just completed processing as a Draft International Standard (DIS), the final review cycle before it becomes a standard. It is anti- cipated that this binding will be published as ISO 8651-1 in January 1988. The Pascal binding has also just finished the DIS cycle, and it too will be published as 1SO 8651-2 also in January 1988. Part 3, the Ada binding, is beginning the DIS cycle and should become ISO 8651-3 in July 1988. The standardization of the C language internation- ally is just completing; current estimates are that the lan- guage will be an ISO standard sometime late 1988. Since finalization of a binding of GKS to C must wait for the lan- guage to be standardized, a draft binding is currently being processed synchronously with the language draft proposed standard and will probably become ISO 8651- 4 in February 1989. As new graphics functional standards emerge, there is a similar need for language bindings to those new stan- dards. For example, GKS-3D is at DIS stage and PHIGS at the draft proposal (DP) stage; subsequent language bind- ings are necessary to make these functional standards usable. CGI, a draft standard for the graphics device inter- face, will also have language bindings defined for it. IMPACT OF BINDINGS ON INDUSTRY The finalization of a standard does not necessarily impact industry immediately or fundamentally. However, the standards developed for the graphics functional area have been accepted by industry eagerly and used in draft form even before they were completed. In 1984, many vendors were already announcing GKS implementa- tions; 1985 brought many more into competition; 1986 has seen GKS drivers available on the marketplace for vir- tually every graphics device. Although Programmer's Hierarchical Interactive Graphics System (PHIGS) will not be standardized until 1988, taking the most optimistic schedule, there are several PHIGS-Iike packages avail- able already. Any changes to these functional standards have obvious impact on any premature implementations. Current customers must be informed if any changes are to be made to the product; updates must be issued; existing software may need costly modification. However, the effects on industry of the standardization of the application programmer interface, the bindings are more relevant to this paper. Although it is the stated intent to accompany each emerging functional specification 418 0010--44885/87/080418--07 $03.00 (~) 1987 Butterworth & Co (Publishers) Ltd computer-aided design