Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ glcompat(3G) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



glcompat(3G)                                                      glcompat(3G)



NAME
     glcompat - controls compatibility modes

C SPECIFICATION
     void glcompat(mode, value)
     long mode, value;

PARAMETERS
     mode    the name of the compatibility mode you want to change.  The
             available modes are:

             GLCOLDPOLYGON controls the state of old-style polygon mode.

             GLCZRANGEMAP controls the state of z-range mapping mode.

             GLCSOFTATTACH controls whether this program will keep mouse
             focus when a shift or control key is pressed.

             GLCMANAGEBG sets imakebackground windows to be override
             redirect.

             GLCSLOWMAPCOLORS controls whether mapcolor calls are buffered.

             GLCINPUTCHANGEBUG controls whether extra INPUTCHANGE events are
             generated when entering and leaving a subwindow.

             GLCNOBORDERBUG controls whether a noborder() window can regain
             its border.

             GLCMQUEUERATE controls the compression of motion events.

             GLCFORCECIMAP controls which colormaps will be installed when an
             RGB window receives colormap focus.

             GLCSETVSYNC sets the value of the vertical retrace counter.

             GLCGETVSYNC returns the present value of the vertical retrace
             counter.

             GLCVSYNCSLEEP puts the calling process to sleep until the
             vertical retrace counter reaches some specified value.

             GLCTABLETSCALE 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.

DESCRIPTION
     glcompat gives control over details of the graphics compatibility between
     IRIS-4D models.





                                                                        Page 1





glcompat(3G)                                                      glcompat(3G)



   Old-Style Polygon Mode (GLCOLDPOLYGON)
     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
          bgnpolygon/endpolygon, bgntmesh/endtmesh, or bgnqstrip/endqstrip.

     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
     GLCOLDPOLYGON to 0, to insure correct operation of new rendering
     features.

     This is a per-window mode.

   Z-Range Mapping Mode (GLCZRANGEMAP)
     When z-range mapping mode is 0, the domain of the z-range arguments to
     lsetdepth, lRGBrange, and lshaderange 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 getgconfig(GCMSZMIN) and the maximum is the value
     returned by getgconfig(GCMSZMAX).  Otherwise, the minimum is the value
     returned by getgconfig(GCZMIN) and the maximum is the value returned by
     getgconfig(GCZMAX).  When this mode is 1, these routines accept the
     range 0x0 to 0x7FFFFF; it is mapped to whatever range the graphics
     hardware supports.

     In order to maintain backwards compatibility, the default GLC_ZRANGEMAP
     is 1 on IRIS-4D B and G models, and 0 on all others.

     This is a per-process mode.

   Soft Attach (GLCSOFTATTACH)
     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
     GLC_SOFTATTACH 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.)

   imakebackground window control (GLCMANAGEBG)
     If set to true, imakebackround 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 imakebackround for more info.




                                                                        Page 2





glcompat(3G)                                                      glcompat(3G)



   Buffered mapcolor (GLCSLOWMAPCOLORS)
     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,
     this will be very inefficient.

   INPUTCHANGE bug compatibility (GLCINPUTCHANGEBUG)
     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.

   noborder() bug compatibility (GLCNOBORDERBUG)
     Calling winconstraints() can restore a border previously removed by a
     call to noborder().  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 (GLCFORCECIMAP)
     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 (GLCMQUEUERATE)
     If the value of GLCMQUEUERATE 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 GLCMQUEUERATE 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 GLCMQUEUERATE,
     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 GLCMQUEUERATE 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
     GLCMQUEUERATE. The first is GLCCOMPATRATE, which gives an event rate
     similar to pre 4.0.  The second is GLCCMPRESS which yields maximum
     "compression" of motion events.

   Vertical retrace counter control
     (GLCSETVSYNC,GLCGETVSYNC,GLCVSYNCSLEEP)
     GLCSETVSYNC 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.  GLCGETVSYNC
     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



                                                                        Page 3





glcompat(3G)                                                      glcompat(3G)



     GLCGETVSYNC stores the current value of the vertical retrace counter.

     GLCVSYNCSLEEP 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 (GLCTABLETSCALE)
     GLCTABLETSCALE 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
     getgdesc, lRGBrange, lsetdepth, lshaderange, imakebackground, 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
     GLC_ZRANGEMAP should be a per-window mode.











                                                                        Page 4



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026