[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 Version 4.1 for AIX: Programming Concepts

Introducing AIX Graphics Library

The AIX GL is a set of graphics and utility subroutines that provide high- and low-level support for graphics. If you are using this library for the first time, read the following sections first.

GL Structure and Function

Graphics primitives are expressed in 2-D or 3-D user-defined coordinates. These primitives go through the graphics pipeline, which performs matrix transformations on the coordinates, clips the coordinates to normalized coordinates, and scales the transformed, clipped coordinates to screen or window coordinates. The output of the graphics pipeline is then sent to the raster subsystem.

The raster subsystem fills in the pixels between the endpoints of the lines and the interiors of polygons; draws bit-mapped characters; and performs shading, depth-cueing, and hidden surface removal. A color value for each pixel is stored in the bitplanes. The system uses the values contained in the bitplanes to display an image on the monitor.

Understanding the Hardware Used by GL

AIX GL runs on high-resolution color workstations. GL provides a set of graphics primitives in a combination of customized, very large scale integrated (VLSI) circuits and conventional hardware, firmware, and software.

The heart of the system is the graphics pipeline. This pipeline accepts points, vectors, polygons, characters, and curves in user-defined coordinate systems and transforms them to screen coordinates. It also provides hardware support for rotation, clipping, and scaling.

In addition to the graphics pipeline, the system consists of one or more general-purpose microprocessors, a raster subsystem, a high-resolution color monitor, a keyboard, and graphics input devices.

GL windowing subroutines are implemented on top of Enhanced X-Windows. (For more information on starting Enhanced X-Windows, see the xinit command.) The GL drawing subroutines are implemented by means of direct adapter access. GL applications and other XClients can run simultaneously on the same X server. GL works with any X-based window manager, including the AIXwindows window manager.


On the POWER GXT1000, the multibuffer, ancillary buffer, and overlay extensions for X must be loaded to run GL.

Hardware and Software Prerequisites for GL

There are both hardware and software prerequisites for running the GL application programming interface (API).

Of the following hardware, GL must have one as a prerequisite:

GL has the following software prerequisites:

Language Bindings

GL is available with C, FORTRAN, and Ada language bindings.

New Features, Documentation, and Programs

This release of GL includes the following new or enhanced functions:

lmdef() Support for two-sided lighting is now available on the POWER Gt4 family of graphics adapters.
set_dither() Suport for enabling/disabling dither on the POWER Gt4 family of graphics adapters is now provided.
glcompat() Controls backwards compatibility modes for the overlay planes and fullscreen function on the GXT1000.

The GL documentation has been updated. In particular, note that Chapter15 contains important information about using GL with the system fork() and exec() routines and about compiling and linking GL programs.

Several new example programs can be found in /usr/lpp/GL/examples, including:

rqenter.c Example showing how to write re-entrant queueing code. The example creates a pipe and then checks for input on both the pipe and on the GL queue. USR1 signals caught by the process result in input being placed on the pipe. (The shell script gen_sig.sh can be used to generate signals.)
xinput.c Example of X/GL integration. Shows how to simultaneously manipulate both the GL and the X11 event queues within the same process. The example can be extended to simultaneously read other (pipe, socket, or file-based) event sources.
Xcolormap.c Example of X/GL integration. Shows how X11 can be used to manipulate the colormap associated with a GL window.
fork_examp.c A very simple example involving GL and the system fork() subroutine. Shows how the GL subsystem must be shut down before using the system fork() routine.
fork_examp2.c    A more sophisticated fork() example.
GLexec.c A very simple example involving GL and the system exec() routine. Shows how the GL subsystem must be shut down before using any of the system exec() routines.

[ Previous | Next | Contents | Glossary | Home | Search ]