glcomp(3G)glcomp(3G)NAMEglcomp - controls compatibility modes
FORTRAN 77 SPECIFICATION
subroutine glcomp(mode, value)
integer*4 mode
integer*4 value
PARAMETERS
mode the name of the compatibility mode you want to change. The
available modes are:
GLCOLD controls the state of old-style polygon mode.
GLCZRA controls the state of z-range mapping mode.
GLCSOF controls whether this program will keep mouse focus when a
shift or control key is pressed.
GLCMAN sets imakebackground windows to be override redirect.
GLCSLO controls whether mapcolor calls are buffered.
GLCINP controls whether extra INPUTCHANGE events are generated
when entering and leaving a subwindow.
GLCNOB controls whether a noborder() window can regain its
border.
GLCMQE controls the compression of motion events.
GLCFOR controls which colormaps will be installed when an RGB
window receives colormap focus.
GLCSET sets the value of the vertical retrace counter.
GLCGET returns the present value of the vertical retrace counter.
GLCVSY puts the calling process to sleep until the vertical
retrace counter reaches some specified value.
GLCTAB determines how tablet coordinates are scaled when the
tablet controls the graphics cursor.
value the value you want to set for the specified compatibility mode.
DESCRIPTIONglcomp gives control over details of the graphics compatibility between
IRIS-4D models.
Page 1
glcomp(3G)glcomp(3G)
Old-Style Polygon Mode (GLCOLD)
By default, old-style polygon mode is 1. Setting it to 0 speeds up old-
style drawing commands but the output is subtly different. See the
``High-Performance Drawing'' and ``Old-Style Drawing'' sections of the
Graphics Library Programming Guide for further explanation of the two
modes and their effects on various machines.
Old-style polygon are polygons drawn with any GL commands other than
bgnpol/endpol, bgntme/endtme, or bgnqst/endqst.
WARNING: some features added recently to the Graphics Library are not
supported by old-style polygons. These features include texture mapping,
fog, and polygon antialiasing. Use new-style polygon commands, or set
GLCOLD to 0, to insure correct operation of new rendering features.
This is a per-window mode.
Z-Range Mapping Mode (GLCZRA)
When z-range mapping mode is 0, the domain of the z-range arguments to
lsetde, lRGBra, and lshade depends on the graphics hardware. When
multisample is enabled, and multisample buffers exist in the current
framebuffer configuration in the current drawmode, the minimum is the
value returned by getgco(GCMZMI) and the maximum is the value returned by
getgco(GCMZMA). Otherwise, the minimum is the value returned by
getgco(GCZMIN) and the maximum is the value returned by getgco(GCZMAX).
When this mode is 1, these routines accept the range $0 to $7FFFFF; it is
mapped to whatever range the graphics hardware supports.
In order to maintain backwards compatibility, the default GLCZRA is 1 on
IRIS-4D B and G models, and 0 on all others.
This is a per-process mode.
Soft Attach (GLCSOF)
Under previous window systems, if any keyboard key was held down, a
window would keep receiving mouse events, even if the mouse moved out of
the window. This type of input distribution is not supported as a
generally available focus policy in X, so the GL provides a similar
behavior from programs which ask for it. If a program sets GLCSOF to
true, then holding down any of the modifier keys (other than alt) locks
the mouse focus onto that window until all modifier keys (other than alt)
are released. (Modifier keys other than alt are shift and control.)
imakeb window control (GLCMAN)
If set to true, imakeb windows will be managed by the window manager.
The correct setting of this will vary based on type of background program
and type of machine and the user's selection of window managers. See the
man page on imakeb for more info.
Buffered mapcolor (GLCSLO)
If set to true, then mapcolor requests are flushed to the window server
as soon as they are made. If a program is calling mapcolor many times,
Page 2
glcomp(3G)glcomp(3G)
this will be very inefficient.
INPUTCHANGE bug compatibility (GLCINP)
This controls what INPUTCHANGE events are delivered as focus moves from a
window to a subwindow. Before 4.0 an INPUTCHANGE with value "0" was
generated as the focus transitioned between a window and its subwindows.
In 4.0 INPUTCHANGE "0" always means that the focus has moved to a
different top level window. Setting this glcompat value to True will
enable the pre 4.0 behavior.
nobor() bug compatibility (GLCNOB)
Calling wincon() can restore a border previously removed by a call to
nobor(). This was not the case before release 4.0. Setting this
glcompat value to True will enabe the pre 4.0 behavior.
Colormap installation for RGB windows (GLCFOR)
When an RGB window receives colormap focus, the colormap for color index
windows is not affected. Setting this glcompat value to True will cause
the color index colormap to be installed when an RGB window gets colormap
focus.
Motion event compression (GLCMQE)
If the value of GLCMQE is zero, then motion events are received
unaltered, with no compression. But if the value is greater than zero,
it is the maximum number of events per second at which the GL Q is
allowed to grow when motion events are received. For example if the
value of GLCMQE is equal to 5, then the GL Q will grow by at most 5
motion events per second.
If a new event arrives at a rate faster than allowed by GLCMQE, the new
event is never thrown away. Rather, the new event overwrites the
previously most recent event in the GL Q. That is, using a positive
value for GLCMQE will not in any way prohibit a program from keeping up
with the device.
There are two defines in <gl.h> which may be used for the value of
GLCMQE. The first is GLCCOM, which gives an event rate similar to pre
4.0. The second is GLCCMP, which yields maximum "compression" of motion
events.
Vertical retrace counter control (GLCSET,GLCGET,GLCVSY)
GLCSET sets the initial value of the vertical retrace counter to the
given value. The vertical retrace counter will then increment by one on
every vertical retrace of the screen display. The frequency of this
increment is governed by the video output format in use. GLCGET allows
the caller to get the current value of the vertical retrace counter.
This value will be stored in the location pointed to by value. Thus value
should be used as a pointer to an integer into which GLCGET stores the
current value of the vertical retrace counter.
Page 3
glcomp(3G)glcomp(3G)
GLCVSY puts the calling process to sleep until the remainder of the
vertical retrace counter divided by the specified interval equals the
specified mod. For example, if the current value of the vertical retrace
counter is 126, the specified interval is 5, and the specified mod is 3,
then the calling process is immediately put to sleep for two vertical
retrace intervals. When the vertical retrace count reaches 128 (such
that 128 mod 5 equals 3), the process is woken up. Value in this case is
a pointer to an array of two integers, the first integer specifies the
interval, the second integer specifies the mod.
Note that the above three vertical retrace counter control functions are
only available on VGX, VGXT, VTX, Reality Engine, Reality Engine 2, Elan,
and Extreme graphics systems. These functions work in immediate mode
only, with graphics rendered locally.
Tablet coordinate scaling (GLCTAB)
The value of GLCTAB is applicable only when the tablet controls the
pointer (graphics cursor). In that case, the value determines how tablet
coordinates are mapped to screen coordinates.
If the value is 0, there is a 1-1 mapping between tablet coordinates and
screen coordinates, so that on a typical tablet, only the lower left
quadrant will be mapped to the screen.
If the value is 1 (the default), then "iso" scaling is performed. That
is, as much of the tablet as possible is mapped to the screen, with the
restriction that a 1-1 aspect ratio is preserved. (I.e. the same scaling
is applied to both x and y.)
If the value is 2, then the entire tablet is mapped to the entire screen.
(This is called "fit" scaling.)
SEE ALSO
getgde, lRGBra, lsetde, lshade, imakeb, glresources
NOTES
This routine is available only in immediate mode.
The state of old-style polygon mode is ignored on IRIS-4D B and G models.
BUG
GLCZRA should be a per-window mode.
Page 4