This section describes how GL drawing subroutines can be used with AIXwindows window management routines to control the mapping of windows, set window properties, and create widgets. The subroutines and techniques described in this section allow the user to mix Enhanced X-Windows and GL calls within the same program. However, not all possible mixings of Enhanced X-Windows and GL within the same program result in predictable behavior. To use GL and Enhanced X-Windows together constructively, it is important to have a basic understanding of the internal structure and implementation of GL in the AIXwindows Environment/6000.
In general, there are two kinds of GL subroutines: those used for drawing or controlling the hardware and those used for window management, obtaining input, and managing pop-up menus. Drawing subroutines (such as v3f, loadmatrix, and nurbssurface) and hardware control subroutines (such as gconfig and zfunction) access and control the graphics adapter directly. That is, there are no complex code layers between these subroutines and the graphics adapter. Specifically, this means that the X server remains ignorant of the current state and contents of a GL window. Eliminating complex code layers improves calculation time.
In contrast, window management subroutines (such as winpop and icontitle) and input subroutines (such as qread and getbutton) are implemented as a layer on top of the Enhanced X-Windows Protocol. As a result, all input and events are obtained from the X server, and the X server knows about and carries out all requests to create, move, map, and resize windows. In this way, a single centralized process manages all windows visible on the screen.
The differences between direct access subroutines and those that work through the X server affect how GL and Enhanced X-Windows can and cannot be used together. The following section discusses restrictions on GL and Enhanced X-Windows use. Later sections discuss and give examples of how GL and Enhanced X-Windows calls can be used together.
For more information on using Enhanced X-Windows calls with GL subroutines, see: