Filewatcher File Search
FTP Search
  
Directory 
  
Content Search 
   
pkg://vogl-1.2.8-1.src.rpm:411559/vogl.tar.gz  info  downloads

vogl/004077500017740000012000000000000556600001600124415ustar00berniedecr377777770000005vogl/docs/004077500017740000012000000000000561260263700134025ustar00berniedecr377777770000005vogl/docs/vogl.doc010066400017740000012000001607710561260262000150410ustar00berniedecr377777770000005


VOGL(3)                C Library Functions                VOGL(3)



NAME
     VOGL - A very ordinary GL Like Library.


DESCRIPTION
     VOGL is a library of C routines which try to  allow  a  pro-
     grammer  to  write  programs  which can be moved to machines
     which have the Silicon Graphics GL library on  them.  It  is
     based  entirely  on  the  VOGLE  graphics  library, and as a
     result  can  handle  circles,  curves,  arcs,  patches,  and
     polygons in a device independent fashion. Simple hidden line
     removal is also available via polygon backfacing. Access  to
     hardware  text  and  double buffering of drawings depends on
     the driver.  There is also a FORTRAN  interface  but  as  it
     goes  through  the  C routines FORTRAN users are warned that
     arrays are in row-column order in C. Both the  long  FORTRAN
     names  and  the shortened six character names are supported.
     People interested in using  software  text  should  see  the
     hershey library, HERSHEY(3).

     Some routines are only available in  VOGL.  If  you  include
     them  in  programs  it  is  advisable to put #ifdef VOGL ...
     #endif around them. The constant VOGL is defined whenever  a
     VOGL header file is included.

     It should be noted that there are a number of routines  that
     take the type Angle for some of their parameters. All angles
     specified this way are actually Integer Tenths  Of  Degrees.
     (Don't ask!)


  Include files.
     There are two include files provided with vogl:  vogl.h  and
     vodevice.h.   The  file  vogl.h has the type definitions and
     function interfaces, ideally it is included where you  would
     include  gl.h on an SGI. The file vodevice.h has the devices
     in it, and it is included where you would  include  device.h
     on an SGI.


     The following is a brief summary of the VOGL subroutines.

  Using X toolkits and Sunview
     For X11 and Sunview based applications, it  is  posible  for
     VOGL  to use a window that is supplied by that application's
     toolkit.  Under  these  circumstances,  the  toolkit  is  is
     responsible  for handling of all input events, and VOGL sim-
     ply draws into the supplied  window.  These calls  are  only
     available  from  C.  Also  see  the directories examples/xt,
     examples/xview and examples/sunview.

     For X based toolkits the following two calls may be used:



VOGL 1.2.8          Last change: 12 Oct 1993                    1






VOGL(3)                C Library Functions                VOGL(3)



     vo_xt_window(display, xwin, width, height)
          Tells VOGL to use the supplied window xwin

               vo_xt_window(display, xwin, width, height)
                    Display   *display;
                    Window    xwin;
                    int  width, height;

          This routine should be called before calling "ginit()".

     vo_xt_win_size(width, height)
          Tells VOGL that the supplied window has changed size.

               vo_xt_win_size(width, height)
                    int  width, height;


     vo_xt_get_display()
          Returns the current display that VOGL  beleives  it  is
          using.
                  Display *
                  vo_xt_get_display()


     vo_xt_get_window()
          Returns the current window that  VOGL  beleives  it  is
          using.
                  Window
                  vo_xt_get_window()


     vo_xt_get_GC()
          Returns the current Graphics Context that VOGL beleives
          it is using.
                  GC
                  vo_xt_get_GC()



For sunview based applications the following  two  calls  may  be
used:


     vo_sunview_canvas(canvas, width, height)
          Tells VOGL to use the supplied sunview canvas canvas

     vo_sunview_canvas(canvas, width, height)
                    Canvas    canvas;
                    int  width, height;


          This routine should be called before calling "ginit()".



VOGL 1.2.8          Last change: 12 Oct 1993                    2






VOGL(3)                C Library Functions                VOGL(3)



     vo_sunview_canvas_size(width, height)
          Tells VOGL that the supplied canvas has changed size.

               vo_sunview_canvas_size(width, height)
                    int  width, height;



  Device routines.
     vinit(device)
          Tell VOGL what the device is. This routine needs to  be
          called  if  the environment variable VDEVICE isn't set,
          or if the value in VDEVICE is not to be used.

               Fortran:
                    subroutine vinit(device, len)
                    character *(*) device
                    integer len

               C:
                    vinit(device);
                    char     *device;

               Note 1 :- Current available devices are:
                        tek - tektronix 4010 and compatibles
                        hpgl - HP Graphics language and compatibles
                        dxy - roland DXY plotter language
                        postscript - monochrome postscript devices
                        ppostscript - monochrome postscript devices (portrait mode)
                        cps - colour postscript devices
                        pcps - colour postscript devices (portrait mode)
                        grx - the GRX library that is part of DJGPP.
                              - (little tested)
                        sun - Sun workstations running sunview
                        X11 - X windows (SUN's Openwindows etc etc)
                        decX11 - the decstation (old) window manager
                              This is only included in case you need it.
                        apollo - Apollo workstations
                        NeXT   - NeXTStep
                        hercules - IBM PC hercules graphics card
                        cga - IBM PC cga graphics card
                        ega - IBM PC ega graphics card
                        vga - IBM PC vga graphics card
                        sigma - IBM PC sigma graphics card.
                        mswin - MS-windoze (little tested).

                        Sun, X11, decX11, apollo, hercules, cga
                        and ega support double buffering.







VOGL 1.2.8          Last change: 12 Oct 1993                    3






VOGL(3)                C Library Functions                VOGL(3)



               Note 2 :- If device is a NULL or a null string the value
                    of the environment variable "VDEVICE" is taken as the
                    device type to be opened.

               Note 3 :- after init it is wise to explicitly
                    clear the screen.

               e.g.: in C
                    color(BLACK);
                    clear();

               or    in Fortran
                    call color(BLACK)
                    call clear


     ginit()
          Open the graphics device and do the  basic  initialisa-
          tion. This routine is marked for obsolescence. The rou-
          tine winopen (see below) should be used instead.  Note:
          this  automatically  causes a REDRAW event to appear as
          the first event in the event queue.

               Fortran:
                    subroutine ginit

               C:
                    ginit()


     winopen(title)
          Open the graphics device and do the  basic  initialisa-
          tion.  This  routine  should  be used instead of ginit.
          Note: this  automatically  causes  a  REDRAW  event  to
          appear as the first event in the event queue.

               Fortran:
                    subroutine winopen(title, len)
                    character*(*) title
                    integer len

               C:
                    winopen(title)
                         char *title;


     gexit()
          Reset the window/terminal (must be the last  VOGL  rou-
          tine called)

               Fortran:
                    subroutine gexit



VOGL 1.2.8          Last change: 12 Oct 1993                    4






VOGL(3)                C Library Functions                VOGL(3)



               C:
                    gexit()


     voutput(path)
          Redirect output from *next*  ginit  to  file  given  by
          path. This routine only applies to devices drivers that
          write to stdout e.g. postscript and hpgl.

               Fortran:
                    subroutine voutput(path, len)
                    character*(*) path
                    integer len

               C:
                    voutput(path)
                         char *path;


     vnewdev(device)
          Reinitialize VOGL to use a new device without  changing
          attributes,  viewport  etc.   (eg.  window and viewport
          specifications)

               Fortran:
                    subroutine vnewdev(device, len)
                    character *(*) device
                    integer len

               C:
                    vnewdev(device)
                         char *device;

          getplanes() Returns the number of bit planes (or  color
          planes)  for  a particular device. The number of colors
          displayable by the device is then 2**(nplanes-1)

               Fortran:
                    integer function  getplanes()

               C:
                    long
                    getplanes()


  Routines for controling flushing or syncronisation
     On some devices (particularly X11) considerable speedups  in
     display can be achieved by not flushing each graphics primi-
     tive call  to  the  actual  display  until  necessary.  VOGL
     automatically delays flushing under in following cases:

          - Within a callobj() call.



VOGL 1.2.8          Last change: 12 Oct 1993                    5






VOGL(3)                C Library Functions                VOGL(3)



          - Within curves and patches.
          - Within bgn*/end* calls.
          - When double buffering (the flush is only done withing swapbuffers).

     There are two user routines (which are  NOT  GL  compatible)
     that can be used to control flushing.

     vsetflush(yesno)
          Set global flushing status. If yesno = 0 (.false.) then
          don't  do  any  flushing  (except  in swapbuffers(), or
          vflush()). If yesno = 1 (.true.) then do  the  flushing
          as described above.

               Fortran:
                    subroutine vsetflush(yesno)
                    logical yesno

               C:
                    void
                    vsetflush(yesno)
                         int  yesno;

     vflush()
          Call the device flush or syncronisation  routine.  This
          forces a flush.

               Fortran:
                    subroutine vflush

               C:
                    void
                    vflush();

  Routines For Setting Up Windows.
     Some devices are basically window orientated - like  sunview
     and X11. You can give VOGL some information about the window
     that it will use with these routines.  These can  make  your
     code  very  device  dependent.  Both routines take arguments
     which are in device space. (0, 0) is the  bottom  left  hand
     corner  in  device  space. To have any effect these routines
     must be called before ginit or winopen.  For the X11 device,
     an  entry  may  be  made in your .Xdefaults file of the form
     vogl.Geometry  =150x500+550+50  (where  you   specify   your
     geometry as you please).

     prefposition(x1, x2, y1, y2)
          Specify the preferred position of the window opened  by
          the *next* winopen.

               Fortran:
                    subroutine prefposition(x1, x2, y1, y2)
                    integer x1, x2, y1, y2



VOGL 1.2.8          Last change: 12 Oct 1993                    6






VOGL(3)                C Library Functions                VOGL(3)



               C:
                    prefposition(x1, x2, y1, y2)
                         long x1, x2, y1, y2


     prefsize(width, height)
          Specify the preferred width and height  of  the  window
          opened by the *next* winopen.

               Fortran:
                    subroutine prefsize(width, height)
                    integer width, height

               C:
                    prefsize(width, height)
                         long width, height;


     reshapeviewport
          This is occasionally used in Iris GL if a REDRAW  event
          rolls  up.  While  VOGL  is  unlikely to ever provide a
          REDRAW event (except possibly the first  event  in  the
          event queue) the call is provided for compatibility.

               Fortran:
                    subroutine reshap

               C:
                    reshapeviewport()


  General Routines.
     clear()
          Clears the current viewport to the current colour.

               Fortran:
                    subroutine clear

               C:
                    clear()


     color(col)
          Set the current colour. The  standard  colours  are  as
          follows:
               black = 0       red = 1         green = 2       yellow = 3
               blue = 4        magenta = 5     cyan = 6        white = 7.

               These are included in vogl.h as:

                  BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN and WHITE.




VOGL 1.2.8          Last change: 12 Oct 1993                    7






VOGL(3)                C Library Functions                VOGL(3)



               When using fortran these are included in fvogl.h as
                  BLACK, RED, GREEN, YELLOW, BLUE, MAGENT, CYAN and WHITE.

               Fortran:
                    subroutine color(col)
                    integer col

               C:
                    color(col)
                         Colorindex     col;


     colorf(col)
          Same as color only it takes a floating point  argument.
          In  Iris  GL there are sometimes good reasons for using
          this routine over color. See the  GL  manual  for  more
          details.

               Fortran:
                    subroutine colorf(col)
                    real col

               C:
                    colorf(col)
                         float     col;


     mapcolor(indx, red, green, blue)
          Set the color map index indx to the  color  represented
          by  (red, green, blue).  If the device has no color map
          this call does nothing.

               Fortran:
                    subroutine mapcolor(indx, red, green, blue)
                    integer indx, red, green, blue

               C:
                    mapcolor(indx, red, green, blue)
                         Colorindex     indx;
                         short          red, green, blue;


     defbasis(id, mat)
          Define basis number id to be the matrix mat.

               Fortran:
                    subroutine defbasis(id, mat)
                    integer id
                    real mat(4, 4)

               C:
                    defbasis(id, mat)



VOGL 1.2.8          Last change: 12 Oct 1993                    8






VOGL(3)                C Library Functions                VOGL(3)



                         short     id;
                         Matrix    mat;


     polymode(mode)
          NOTE:- For this call to have any effect  it  must  have
          been  conditionally  compilied  into  the library. (See
          polygons.c  for  details)  Control   the   filling   of
          polygons.  It  expects  one  of the following PYM_LINE,
          which means only the edges of the polygon will be drawn
          and   PYM_FILL   which  means  fill  the  polygon  (the
          default). PYM_POINT and PYM_HOLLOW are also  recognised
          but they don't behave quite as they would with SGI GL.

          Also note that in Fortran the  corresponding  constants
          are  truncated  to  PYM_LI,  PYM_FI,  PYM_PO and PYM_HO
          respectivly. These appear in fvogl.h.


               Fortran:
                    subroutine polymode(mode)
                    integer mode

               C:
                    polymode(mode)
                         long mode;


  The Device Queue and Valuator Routines.
     The available  devices  are  defined  in  the  header  files
     vodevice.h and for FORTRAN fvodevice.h

     qdevice(dev)
          Enable a device. Note: in VOGL the queue is  of  length
          1.

               Fortran:
                    subroutine qdevice(dev)
                    integer dev

               C:
                    qdevice(dev)
                         Device    dev;


     unqdevice(dev)
          Disable a device.

               Fortran:
                    subroutine qdevice(dev)
                    integer dev




VOGL 1.2.8          Last change: 12 Oct 1993                    9






VOGL(3)                C Library Functions                VOGL(3)



               C:
                    qdevice(dev)
                         Device    dev;


     qread(data)
          Read an event from  the  device  queue.  This  routines
          blocks  until  something happens. Note: it is important
          to have called qdevice before doing this.

               Fortran:
                    integer function qread(data)
                    integer*2 data

               C:
                    long qread(data)
                         short     *data;


     isqueued(dev)
          Check to see if device dev is enabled for queueing.

               Fortran:
                    logical function isqueued(dev)
                    integer dev

               C:
                    Boolean isqueued(dev)
                         short     *dev;


     qtest()
          Check if there is anything in the queue. Note: in  VOGL
          the queue is only 1 entry deep.

               Fortran:
                    logical function qtest

               C:
                    Boolean qtest()


     qreset()
          Reset the device queue. This will get rid of any  pend-
          ing events.

               Fortran:
                    subroutine qreset

               C:
                    qreset()




VOGL 1.2.8          Last change: 12 Oct 1993                   10






VOGL(3)                C Library Functions                VOGL(3)



     getbutton(dev)
          Returns the up (0) or down (1) state of a button.

               Fortran:
                    logical function getbutton(dev)
                    integer dev

               C:
                    Boolean getbutton(dev)
                         Device    dev;


     getvaluator(dev)
          Return the current value of the valuator. Currently the
          only valuators supported are MOUSEX and MOUSEY.

               Fortran:
                    integer function getvaluator(dev)
                    integer dev

               C:
                    long getvaluator(dev)
                         Device    dev;


  Viewport Routines.
     viewport(left, right, bottom, top)
          Specify which part of the  screen  to  draw  in.  Left,
          right,  bottom,  and  top  are integer values in screen
          coordinates.

               Fortran:
                    subroutine viewport(left, right, bottom, top)
                    integer left, right, bottom, top

               C:
                    viewport(left, right, bottom, top)
                         Screencoord      left, right, bottom, top;


     pushviewport()
          Save current viewport on the viewport stack.

               Fortran:
                    subroutine pushviewport

               C:
                    pushviewport()


     popviewport()
          Retrieve last pushed viewport.



VOGL 1.2.8          Last change: 12 Oct 1993                   11






VOGL(3)                C Library Functions                VOGL(3)



               Fortran:
                    subroutine popviewport

               C:
                    popviewport()


     getviewport(left, right, bottom, top)
          Returns the left, right, bottom and top limits  of  the
          current viewport in screen coordinates.

               Fortran:
                    subroutine getviewport(left, right, bottom, top)
                    integer*2 left, right, bottom, top

               C:
                    getviewport(left, right, bottom, top)
                         Screencoord      *left, *right, *bottom, *top;


  Attribute Stack Routines.
     The attribute stack contains details such as current  color,
     current  line  style and width, and the current font number.
     If you need to prevent object calls form changing these, use
     pushattributes before the call and popattributes after.

     pushattributes()
          Save the current attributes on the attribute stack.

               Fortran:
                    subroutine pushattributes

               C:
                    pushattributes()

     popattributes()
          Restore the attributes to what they were  at  the  last
          pushattribute().

               Fortran:
                    subroutine popattributes

               C:
                    popattributes()


  Projection Routines.
     All the projection  routines  define  a  new  transformation
     matrix,  and  consequently the world units. Parallel projec-
     tions are defined by ortho or  ortho2.  Perspective  projec-
     tions  can  be  defined by perspective and window.  Note the
     types Angle, etc, are defined in vogl.h. Remember angles are



VOGL 1.2.8          Last change: 12 Oct 1993                   12






VOGL(3)                C Library Functions                VOGL(3)



     in tenths of degrees.

     ortho(left, right, bottom, top, near, far)
          Define x (left, right), y (bottom, top), and  z  (near,
          far)  clipping planes. The near and far clipping planes
          are actually specified as distances along the  line  of
          sight.  These  distances  can  also  be  negative.  The
          actual location of the clipping planes is z  =  -near_d
          and z = -far_d.

               Fortran:
                    subroutine ortho(left, right, bottom, top, near_d, far_d)
                    real left, right, bottom, top, near_d, far_d

               C:
                    ortho(left, right, bottom, top, near_d, far_d)
                         Coord     left, right, bottom, top, near_d, far_d;


     ortho2(left, right, bottom, top)
          Define x (left, right), and y  (bottom,  top)  clipping
          planes.

               Fortran:
                    subroutine ortho2(left, right, bottom, top)
                    real left, right, bottom, top

               C:
                    ortho2(left, right, bottom, top)
                         float     left, right, bottom, top;


     perspective(fov, aspect, near, far)
          Specify a perspective viewing pyramid in world  coordi-
          nates  by  giving a field of view, aspect ratio and the
          distance from the eye of  the  near  and  far  clipping
          plane.

          The fov, specifies the field of view in  the  y  direc-
          tion. It is the range of the area that is being viewed.
          The aspect ratio is the ratio x/y (width/height)  which
          determines the fov in the x direction.


               Fortran:
                    subroutine perspective(fov, aspect, near, far)
                    integer fov
                    real aspect, near, far

               C:
                    perspective(fov, aspect, near, far)
                         Angle     fov;



VOGL 1.2.8          Last change: 12 Oct 1993                   13






VOGL(3)                C Library Functions                VOGL(3)



                         float     aspect;
                         Coord     near, far;


     window(left, right, bot, top, near, far)
          Specify a perspective viewing pyramid in world coordinates by
          giving the rectangle closest to the eye (ie. at the near clipping
          plane) and the distances to the near and far clipping planes.

               Fortran:
                    subroutine window(left, right, bot, top, near, far)
                    real left, right, bot, top, near, far

               C:
                    window(left, right, bot, top, near, far)
                         float     left, right, bot, top, near, far;


  Matrix Stack Routines.
     pushmatrix()
          Save the current transformation matrix  on  the  matrix
          stack.

               Fortran:
                    subroutine pushmatrix

               C:
                    pushmatrix()


     popmatrix()
          Retrieve the last matrix pushed and make it the current
          transformation matrix.

               Fortran:
                    subroutine popmatrix

               C:
                    popmatrix()


  Viewpoint Routines.
     Viewpoint routines alter the current tranformation matrix.

     polarview(dist, azim, inc, twist)
          Specify the viewer's position in polar  coordinates  by
          giving  the  distance  from  the viewpoint to the world
          origin, the azimuthal angle in the x-y plane,  measured
          from  the y-axis, the incidence angle in the y-z plane,
          measured from the z-axis, and the twist angle about the
          line of sight.




VOGL 1.2.8          Last change: 12 Oct 1993                   14






VOGL(3)                C Library Functions                VOGL(3)



               Fortran:
                    subroutine polarview(dist, azim, inc, twist)
                    real dist
                    integer azim, inc, twist

               C:
                    polarview(dist, azim, inc, twist)
                         Coord     dist;
                         Angle     azim, inc, twist;


     lookat(vx, vy, vz, px, py, pz, twist)
          Specify the viewer's position by giving a viewpoint and
          a  reference  point in world coordinates. A twist about
          the line of sight may also be given.

          The viewpoint is at (vx, vy,  vz).  The  reference  (or
          viewed)  point  is at (px, py, pz). ie the line of site
          is from v to p. The  twist  parameter  is  a  righthand
          rotation about the line of site.


               Fortran:
                    subroutine lookat(vx, vy, vz, px, py, pz, twist)
                    real vx, vy, vz, px, py, pz
                    integer twist

               C:
                    lookat(vx, vy, vz, px, py, pz, twist)
                         float     vx, vy, vz, px, py, pz;
                         Angle     twist;


  Move Routines.
     There are variations on all these routines that end  in  's'
     and  also end in 'i'. In the case of the 's' variations they
     take arguments of type Scoord in C and integer*2 in FORTRAN.
     In  the  case  of  the 'i' variations they take arguments of
     type Icoord in C and integer in FORTRAN.

     move(x, y, z)
          Move current graphics position to (x, y, z). (x, y,  z)
          is a point in world coordinates.

               Fortran:
                    subroutine move(x, y, z)
                    real x, y, z

               C:
                    move(x, y, z)
                         Coord     x, y, z;




VOGL 1.2.8          Last change: 12 Oct 1993                   15






VOGL(3)                C Library Functions                VOGL(3)



     rmv(deltax, deltay, deltaz)
          Relative move. deltax, deltay, and deltaz  are  offsets
          in world units.

               Fortran:
                    subroutine rmv(deltax, deltay, deltaz)
                    real deltax, deltay, deltaz

               C:
                    rmv(deltax, deltay, deltaz)
                         Coord   deltax, deltay, deltaz;


     move2(x, y)
          Move graphics position to point (x, y).  (x,  y)  is  a
          point in world coordinates.

               Fortran:
                    subroutine move2(x, y)
                    real x, y

               C:
                    move2(x, y)
                         Coord     x, y;


     rmv2(deltax, deltay)
          Relative move2. deltax and deltay are offsets in  world
          units.

               Fortran:
                    subroutine rmv2(deltax, deltay)
                    real deltax, deltay

               C:
                    rmv2(deltax, deltay)
                         Coord     deltax, deltay;



  Line routines.
     These  routines set the line style and  line  width  if  the
     current device is capable of doing so.

     deflinestyle(n, style)
          Define a line style and binds it to the integer n.  The
          line style is a bit pattern of 16 bits width.
               Fortran:
                    subroutine deflin(n, style)
                    integer   n
                    integer style




VOGL 1.2.8          Last change: 12 Oct 1993                   16






VOGL(3)                C Library Functions                VOGL(3)



               C:
                    deflinestyle(n, style)
                         short     n;
                         Linestyle style;



     setlinestyle(n)
          Sets the current line style.
               Fortran:
                    subroutine setlin(n)
                    integer   n

               C:
                    setlinestyle(n)
                         short     n;



     linewidth(n)
          Sets the current line width to 'n' pixels wide.
               Fortran:
                    subroutine linewi(n)
                    integer   n

               C:
                    linewidth(n)
                         short     n;




  Drawing Routines.
     There are variations on all these routines that end  in  's'
     and  also end in 'i'. In the case of the 's' variations they
     take arguments of type Scoord in C and integer*2 in FORTRAN.
     In  the  case  of  the 'i' variations they take arguments of
     type Icoord in C and integer in FORTRAN.

     draw(x, y, z)
          Draw from current graphics position to (x, y,  z).  (x,
          y, z) is a point in world coordinates.

               Fortran:
                    subroutine draw(x, y, z)
                    real x, y, z

               C:
                    draw(x, y, z)
                         Coord     x, y, z;





VOGL 1.2.8          Last change: 12 Oct 1993                   17






VOGL(3)                C Library Functions                VOGL(3)



     rdr(deltax, deltay, deltaz)
          Relative draw. deltax, deltay, and deltaz  are  offsets
          in world units.

               Fortran:
                    subroutine rdr(deltax, deltay, deltaz)
                    real deltax, deltay, deltaz

               C:
                    rdr(deltax, deltay, deltaz)
                         Coord   deltax, deltay, deltaz;


     draw2(x, y)
          Draw from current graphics position to  point  (x,  y).
          (x, y) is a point in world coordinates.

               Fortran:
                    subroutine draw2(x, y)
                    real x, y

               C:
                    draw2(x, y)
                         Coord     x, y;


     rdr2(deltax, deltay)
          Relative draw2. deltax and deltay are offsets in  world
          units.

               Fortran:
                    subroutine rdr2(deltax, deltay)
                    real deltax, deltay

               C:
                    rdr2(deltax, deltay)
                         Coord   deltax, deltay;



  Vertex calls.
     There are calls which we term 'vertex  calls'  which  simply
     specify  a  point in 4D, 3D or 2D. These calls take an array
     which specifies the coordinates of the point. The  interpre-
     tation of these points is described below.

     v4d(v) Specify a vertex(point) in 4D using double  precision
     numbers.

          Fortran:
               subroutine v4d(v)
               real *8 v(4)



VOGL 1.2.8          Last change: 12 Oct 1993                   18






VOGL(3)                C Library Functions                VOGL(3)



          C:
               v4d(v)
                    double v[4];


     v4f(v) Specify a vertex(point) in 4D using single  precision
     floating point numbers.

          Fortran:
               subroutine v4f(v)
               real v(4)

          C:
               v4f(v)
                    float v[4];


     v4i(v) Specify a vertex(point) in 4D using integer numbers

          Fortran:
               subroutine v4i(v)
               integer v(4)

          C:
               v4i(v)
                    long v[4];


     v4s(v) Specify a vertex(point) in  4D  using  short  integer
     numbers

          Fortran:
               subroutine v4s(v)
               integer *2  v(4)

          C:
               v4s(v)
                    short v[4];




     There are also equivalent calls for  3D  points  (v3d,  v3f,
     v3i,  v3s)  and  2D  points  (v2d,  v2f, v2i, v2s). The only
     difference is the number of elements that each vertex  needs
     to  be  specified. It should also be noted the the different
     data types (ie. double, float, long and  short)  are  merely
     different  ways  of  representing  the same basic coordinate
     data (calling v3s with v[] = {100,200,200} is  the  same  as
     calling v3f with v[] = {100.0, 200.0, 200.0}).

     The way these points are interpreted depends  on  what  mode



VOGL 1.2.8          Last change: 12 Oct 1993                   19






VOGL(3)                C Library Functions                VOGL(3)



     has  be  set  up  with  one  of the calls bgnpoint, bgnline,
     bgnclosedline or bgnpolygon.  The  bgnpoint  call  specifies
     that  the next series of vertex calls are specifying a chain
     of points (dots) to be drawn. A bgnpoint is terminated  with
     a endpoint call.

          Fortran:
               subroutine bgnpoint

          C:
               bgnpoint()

          Fortran:
               subroutine endpoint

          C:
               endpoint()



     The bgnline call specifies that the next  series  of  vertex
     calls are specifying the points on a polyline. A bgnline
      is terminated with a endline call.

          Fortran:
               subroutine bgnline

          C:
               bgnline()

          Fortran:
               subroutine endline

          C:
               endline()



     The bgnclosedline call is similar to the bgnline except that
     when  endclosedline is called the first point given (ie. the
     one first after the bgnclosedline call)  is  joined  to  the
     last  point given (ie. the one just before the endclosedline
     call).

          Fortran:
               subroutine bgncloseline

          C:
               bgnclosedline()

          Fortran:
               subroutine endclosedline



VOGL 1.2.8          Last change: 12 Oct 1993                   20






VOGL(3)                C Library Functions                VOGL(3)



          C:
               endclosedline()



     The bgnpolygon call specifies that the next series of vertex
     calls  are  defining  a polygon.  When endpolygon is called,
     the polygon is closed and filled (or  drawn  as  an  outline
     depending  on  the  mode that has been set with the polymode
     call if this call has been compilied into the library.


          Fortran:
               subroutine bgnpolygon

          C:
               bgnpolygon()

          Fortran:
               subroutine endpolygon

          C:
               endpolygon()




  Arcs and Circles.
     There are variations on all these routines that end  in  's'
     and  also end in 'i'. In the case of the 's' variations they
     take arguments of type Scoord in C and integer*2 in FORTRAN.
     In  the  case  of  the 'i' variations they take arguments of
     type Icoord in C and integer in FORTRAN.

     circleprecision(nsegs)
          Set the number of line segments  making  up  a  circle.
          Default  is  currently 32. The number of segments in an
          arc is calculated from nsegs according the span of  the
          arc.  This routine is only available in VOGL.
               Fortran:
                    subroutine circleprecision(nsegs)
                    integer   nsegs
               C:
                    circleprecision(nsegs)
                         int  nsegs;


     arc(x, y, radius, startang, endang)
          Draw an arc. x, y,  and  radius  are  values  in  world
          units.

               Fortran:



VOGL 1.2.8          Last change: 12 Oct 1993                   21






VOGL(3)                C Library Functions                VOGL(3)



                    subroutine arc(x, y, radius, startang, endang)
                    real x, y, radius;
                    integer startang, endang;
               C:
                    arc(x, y, radius, startang, endang)
                         Coord  x, y, radius;
                         Angle  startang, endang;


     arcf(x, y, radius, startang, endang)
          Draw a filled arc. x, y, and radius are values in world
          units.  (How the filling is done may be changed by cal-
          ling polymode , if this call has  been  compilied  into
          the library).

               Fortran:
                    subroutine arcf(x, y, radius, startang, endang)
                    real x, y, radius;
                    integer startang, endang;
               C:
                    arcf(x, y, radius, startang, endang)
                         Coord  x, y, radius;
                         Angle  startang, endang;


     circ(x, y, radius)
          Draw a circle. x, y, and radius  are  values  in  world
          units.

               Fortran:
                    subroutine circ(x, y, radius)
                    real x, y, radius
               C:
                    circ(x, y, radius)
                         Coord     x, y, radius;


     circf(x, y, radius)
          Draw a filled circle. x, y, and radius  are  values  in
          world units.  How the filling is done may be changed by
          calling polymode.

               Fortran:
                    subroutine circf(x, y, radius)
                    real x, y, radius
               C:
                    circf(x, y, radius)
                         Coord     x, y, radius;


  Curve Routines.
     curvebasis(id)



VOGL 1.2.8          Last change: 12 Oct 1993                   22






VOGL(3)                C Library Functions                VOGL(3)



          Set the basis matrix for a curve to the  matrix  refer-
          enced  by id.  The matrix and it's id are tied together
          with a call to defbasis.

               Fortran:
                    subroutine curvebasis(id)
                    integer id
               C:
                    curvebasis(id)
                         short     id;


     curveprecision(nsegs)
          Define the number of  line  segments  used  to  draw  a
          curve.

               Fortran:
                    subroutine curveprecision(nsegs)
                    integer nsegs

               C:
                    curveprecision(nsegs)
                         short     nsegs;


     rcrv(geom)
          Draw a rational curve.

               Fortran:
                    subroutine rcrv(geom)
                    real geom(4,4)
               C:
                    rcrv(geom)
                         Coord     geom[4][4];


     rcrvn(n, geom)
          Draw n - 3 rational curve segments. Note: n must be  at
          least 4.

               Fortran:
                    subroutine rcrvn(n, geom)
                    integer n
                    real geom(4,n)
               C:
                    rcrvn(n, geom)
                         long n;
                         Coord     geom[][4];


     crv(geom)
          Draw a curve.



VOGL 1.2.8          Last change: 12 Oct 1993                   23






VOGL(3)                C Library Functions                VOGL(3)



               Fortran:
                    subroutine crv(geom)
                    real geom(3,4)
               C:
                    crv(geom)
                         Coord     geom[4][3];


     crvn(n, geom)
          Draw n - 3 curve segments. Note: n must be at least 4.

               Fortran:
                    subroutine crvn(n, geom)
                    integer n
                    real geom(3,n)
               C:
                    crvn(n, geom)
                         long n;
                         Coord     geom[][3];


     curveit(n)
          Draw a curve segment by iterating the top matrix in the
          matrix  stack as a forward difference matrix. This per-
          forms 'n' iterations.

               Fortran:
                    subroutine curveit(n)
                    integer n

               C:
                    curveit(n)
                         short     n;


  Rectangles and General Polygon Routines.
     See also Vertex  calls  above.   The  way  in  which  filled
     polygons (including circles and arcs) are treated depends on
     the mode that has been set with the polymode call.

     There are variations on all these routines that end  in  's'
     and  also end in 'i'. In the case of the 's' variations they
     take arguments of type Scoord in C and integer*2 in FORTRAN.
     In  the  case  of  the 'i' variations they take arguments of
     type Icoord in C and integer in FORTRAN.

     rect(x1, y1, x2, y2)
          Draw a rectangle.

               Fortran:
                    subroutine rect(x1, y1, x2, y2)
                    real x1, y1, x1, y2



VOGL 1.2.8          Last change: 12 Oct 1993                   24






VOGL(3)                C Library Functions                VOGL(3)



               C:
                    rect(x1, y1, x2, y2)
                         Coord     x1, y1, x2, y2;


     rectf(x1, y1, x2, y2)
          Draw a filled rectangle. (How the filling is  done  may
          be  changed by calling polymode , if this call has been
          compilied into the library).

               Fortran:
                    subroutine rectf(x1, y1, x2, y2)
                    real x1, y1, x1, y2
               C:
                    rectf(x1, y1, x2, y2)
                         Coord     x1, y1, x2, y2;


     poly2(n, points)
          Construct a (x, y) polygon from an array of points pro-
          vided by the user.

               Fortran:
                    subroutine poly2(n, points)
                    integer n
                    real points(2, n)
               C:
                    poly2(n, points)
                         long n;
                         Coord     points[][2];


     polf2(n, points)
          Construct a filled (x, y)  polygon  from  an  array  of
          points  provided by the user.  (How the filling is done
          may be changed by calling polymode , if this  call  has
          been compilied into the library).

               Fortran:
                    subroutine polf2(n, points)
                    integer n
                    real points(2, n)
               C:
                    polf2(n,  points)
                         long n;
                         Coord     points[][2];


     poly(n, points)
          Construct a polygon from an array of points provided by
          the user.




VOGL 1.2.8          Last change: 12 Oct 1993                   25






VOGL(3)                C Library Functions                VOGL(3)



               Fortran:
                    subroutine poly(n, points)
                    integer n
                    real points(3, n)
               C:
                    poly(n,  points)
                         long n;
                         float     points[][3];


     polf(n, points)
          Construct a filled polygon from an array of points pro-
          vided  by  the  user.   (How the filling is done may be
          changed by calling polymode , if  this  call  has  been
          compilied into the library).

               Fortran:
                    subroutine polf(n, points)
                    integer n
                    real points(3, n)
               C:
                    polf(n, points)
                         long n;
                         Coord     points[][3];


     backface(onoff)
          Turns on culling of backfacing polygons. A  polygon  is
          backfacing  if  it's  orientation in *screen* coords is
          clockwise.

               Fortran:
                    subroutine backface(onoff)
                    logical onoff

               C:
                    backface(onoff)
                         Boolean   onoff;


     frontface(onoff)
          Turns on culling of frontfacing polygons. A polygon  is
          frontfacing  if  it's orientation in *screen* coords is
          anticlockwise.

               Fortran:
                    subroutine frontface(clockwise)
                    logical onoff

               C:
                    frontface(clockwise)
                         Boolean   onoff;



VOGL 1.2.8          Last change: 12 Oct 1993                   26






VOGL(3)                C Library Functions                VOGL(3)



  Text routines.
     The original VOGLE hardware fonts "small" and  "large"  have
     the  font  numbers 0 and 1 respectively. The default font is
     0. For X11 displays the default fonts used  by  the  program
     can  be  overridden by placing the following defaults in the
     ~/.Xdefaults file:
          vogl.smallfont: <font name>
          vogl.largefont: <font name>

     font(fontid)
          Set the current font

               Fortran:
                    subroutine font(fontid)
                    integer fontid;

               C:
                    font(fontid)
                         short     fontid;


     cmov(x, y, z)
          Change the current character position. The usual varia-
          tions with the extensions 'i' and 's' also apply here.

               Fortran:
                    subroutine cmov(x, y, z)
                    real x, y, z;

               C:
                    cmov(x, y, z)
                         Coord     x, y, z;


     cmov2(x, y)
          Change the current character position in x and  y.  The
          usual  variations  with the extensions 'i' and 's' also
          apply here.

               Fortran:
                    subroutine cmov2(x, y)
                    real x, y;

               C:
                    cmov2(x, y)
                         Coord     x, y;


     getheight()
          Return the maximum height in the current font.

               Fortran:



VOGL 1.2.8          Last change: 12 Oct 1993                   27






VOGL(3)                C Library Functions                VOGL(3)



                    integer function getheight

               C:
                    long
                    getheight()


     strwidth(s)
          Return the length of the string s in screen coords.

               Fortran:
                    integer function strwidth(s, n)
                         character *(*) s
                         integer   n;

               C:
                    long
                    strwidth(s)
                         char *s;


     All transformations are cumulative, so if you  rotate  some-
     thing  and  then do a translate you are translating relative
     to the rotated axes. If you need  to  preserve  the  current
     transformation  matrix use pushmatrix(), do the drawing, and
     then call popmatrix() to get back where you were before.

     translate(x, y, z)
          Set up a translation.

               Fortran:
                    subroutine translate(x, y, z)
                    real x, y, z
               C:
                    translate(x, y, z)
                         Coord     x, y, z;


     scale(x, y, z)
          Set up scaling factors in x, y, and z axis.

               Fortran:
                    subroutine scale(x, y, z)
                    real x, y, z

               C:
                    scale(x, y, z)
                         Coord     x, y, z;


     rot(angle, axis)
          Set up a rotation in axis axis. Axis  is  one  of  'x',



VOGL 1.2.8          Last change: 12 Oct 1993                   28






VOGL(3)                C Library Functions                VOGL(3)



          'y',  or  'z'.  The angle in this case is a real number
          in degrees.

               Fortran:
                    subroutine rot(angle, axis)
                    real angle
                    character axis

               C:
                    rot(angle, axis)
                         float     angle;
                         char axis;


     rotate(angle, axis)
          Set up a rotation in axis axis. Axis  is  one  of  'x',
          'y',  or  'z',  and  the angle is in tenths of degrees.
          Makes you feel sentimental doesn't it.

               Fortran:
                    subroutine rotate(angle, axis)
                    integer angle
                    character axis

               C:
                    rotate(angle, axis)
                         Angle     angle;
                         char axis;


  Patch Routines.
     patchbasis(tbasisid, ubasisid)
          Define the t and u basis matrix id's of a patch. It  is
          assumed  that tbasisid and ubasisid have matrices asso-
          ciated with  them  already  (this  is  done  using  the
          defbasis call).

               Fortran:
                    subroutine patchbasis(tid, uid)
                    integer tid, uid

               C:
                    patchbasis(tid, ubid)
                         long tid, uid


     patchprecision(tseg, useg)
          Set the minimum  number  of  line  segments  making  up
          curves in a patch.

               Fortran:
                    subroutine patchprecision(tseg, useg)



VOGL 1.2.8          Last change: 12 Oct 1993                   29






VOGL(3)                C Library Functions                VOGL(3)



                    integer tseg, useg

               C:
                    patchprecision(tseg, useg)
                         long     tseg, useg;


     patchcurves(nt, nu)
          Set the number of curves making up a patch.

               Fortran:
                    subroutine patchcurves(nt, nu)
                    integer nt, nu

               C:
                    patchcurves(nt, nu)
                         long     nt, nu;


     rpatch(gx, gy, gz, gw)
          Draws a rational patch in the current basis,  according
          to the geometry matrices gx, gy, gz, and gw.

               Fortran:
                    subroutine rpatch(gx, gy, gz, gw)
                    real  gx(4,4), gy(4,4), gz(4,4), gw(4,4)

               C:
                    rpatch(gx, gy, gz, gw)
                        Matrix  gx, gy, gz, gw;


     patch(gx, gy, gz)
          Draws a patch in the current basis,  according  to  the
          geometry matrices gx, gy, and gz.

               Fortran:
                    subroutine patch(gx, gy, gz)
                    real  gx(4,4), gy(4,4), gz(4,4)

               C:
                    patch(gx, gy, gz)
                         Matrix  gx, gy, gz;


  Point Routines.
     There are variations on all these routines that end  in  's'
     and  also end in 'i'. In the case of the 's' variations they
     take arguments of type Scoord in C and integer*2 in FORTRAN.
     In  the  case  of  the 'i' variations they take arguments of
     type Icoord in C and integer in FORTRAN.




VOGL 1.2.8          Last change: 12 Oct 1993                   30






VOGL(3)                C Library Functions                VOGL(3)



     pnt(x, y, z)
          Draw a point at x, y, z

               Fortran:
                    subroutine pnt(x, y, z)
                    real x, y, z

               C:
                    pnt(x, y, z)
                         Coord     x, y, z;


     pnt2(x, y)
          Draw a point at x, y.

               Fortran:
                    subroutine pnt2(x, y)
                    real x, y

               C:
                    pnt2(x, y)
                         Coord     x, y;


  Object Routines.
     Objects are graphical entities created by the  drawing  rou-
     tines  called  between  makeobj and closeobj. Objects may be
     called from within other objects. When an object is  created
     most  of  the  calculations required by the drawing routines
     called within it are  done  up  to  where  the  calculations
     involve the current transformation matrix. So if you need to
     draw the same thing several times on the screen but in  dif-
     ferent  places  it is faster to use objects than to call the
     appropriate drawing routines each time.

     makeobj(n)
          Commence the object number n.

               Fortran:
                    subroutine makeobj(n)
                    integer n

               C:
                    makeobj(n)
                         Object    n;


     closeobj()
          Close the current object.

               Fortran:
                    subroutine closeobj()



VOGL 1.2.8          Last change: 12 Oct 1993                   31






VOGL(3)                C Library Functions                VOGL(3)



               C:
                    closeobj()


     genobj()
          Returns a unique object identifier.

               Fortran:
                    integer function genobj()

               C:
                    Object
                    genobj()


     getopenobj()
          Return the number of the current object.

               Fortran:
                    integer function getopenobj()

               C:
                    Object
                    getopenobj()


     callobj(n)
          Draw object number n.

               Fortran:
                    subroutine callobj(n)
                    integer n

               C:
                    callobj(n)
                         Object    n;


     isobj(n)
          Returns non-zero if there is an object of number n.

               Fortran:
                    logical function isobj(n)
                    integer n

               C:
                    Boolean
                    isobj(n)
                         Object    n;


     delobj(n)



VOGL 1.2.8          Last change: 12 Oct 1993                   32






VOGL(3)                C Library Functions                VOGL(3)



          Delete the object number n.

               Fortran:
                    subroutine delobj(n)
                    integer n

               C:
                    delobj(n)
                         Object    n;


  Double Buffering.
     Where possible VOGL allows for front  and  back  buffers  to
     enable  things  like  animation  and  smooth updating of the
     screen. Note: it  isn't  possible  to  have  backbuffer  and
     frontbuffer true at the same time.

     gconfig
          With Iris GL you must  call  gconfig  for  things  like
          doublebuffering to take effect.

               Fortran:
                    subroutine gconfig

               C:
                    gconfig()


     doublebuffer
          Flags our intention to do double buffering.

               Fortran:
                    subroutine doublebuffer

               C:
                    doublebuffer()


     singlebuffer
          Switch back to singlebuffer mode.

               Fortran:
                    subroutine singlebuffer

               C:
                    singlebuffer()


     backbuffer(Boolean)
          Make VOGL draw in the backbuffer.

               Fortran:



VOGL 1.2.8          Last change: 12 Oct 1993                   33






VOGL(3)                C Library Functions                VOGL(3)



                    subroutine backbuffer(yesno)
                         logical   yesno;

               C:
                    backbuffer(yesno)
                         Boolean   yesno;


     frontbuffer(Boolean)
          Make VOGL draw in the front buffer.

               Fortran:
                    subroutine frontbuffer(yesno)
                         logical   yesno;

               C:
                    frontbuffer(yesno)
                         Boolean   yesno;


     swapbuffers()
          Swap the front and back buffers.

               Fortran:
                    subroutine swapbuffers

               C:
                    swapbuffers()


  Position Routines.
     getgpos(x, y, z, w)
          Gets the current graphics position in world coords.

               Fortran:
                    subroutine getgpos(x, y, z, w)
                    real x, y, z

               C:
                    getgpos(x, y, z, w)
                         Coord *x, *y, *z, *w;


     getcpos(ix, iy)
          Gets the current character position in screen coords.

               Fortran:
                    subroutine getcpo(ix, iy)
                    integer ix, iy

               C:
                    getcpos(ix, iy)



VOGL 1.2.8          Last change: 12 Oct 1993                   34






VOGL(3)                C Library Functions                VOGL(3)



                         Scoord *ix, *iy;


BUGS
     Double buffering isn't supported on all devices.

     The yobbarays may be turned on or they may be turned off.
















































VOGL 1.2.8          Last change: 12 Oct 1993                   35



ormatiovogl/docs/vogl.3010066400017740000012000001125060561260253700144360ustar00berniedecr377777770000005.TH VOGL 3  "12 Oct 1993" "VOGL 1.2.8"
.UC 4
.SH NAME
VOGL \- A very ordinary GL Like Library.

.SH DESCRIPTION
.LP
.I VOGL
is a library of C routines which try to allow a programmer to write programs
which can be moved to machines which have the Silicon Graphics GL library
on them. It is based entirely on the VOGLE graphics library, and as
a result can handle circles, curves, arcs, patches, and polygons
in a device independent fashion. Simple hidden line removal is also
available via polygon backfacing. Access to hardware text and double
buffering of drawings depends on the driver.  There is also a FORTRAN
interface but as it goes through the C routines FORTRAN users are warned
that arrays are in row-column order in C. Both the long FORTRAN names
and the shortened six character names are supported. People interested
in using software text should see the hershey library, 
.I HERSHEY(3).

Some routines are only available in VOGL. If you include them in programs it
is advisable to put #ifdef VOGL ... #endif around them. The constant VOGL
is defined whenever a VOGL header file is included.

It should be noted that there are a number of routines that take the
type
.I Angle
for some of their parameters. All angles specified this way are actually
.I Integer Tenths Of Degrees.
(Don't ask!)

.SS Include files.
.LP
There are two include files provided with vogl: vogl.h and vodevice.h.
The file vogl.h has the type definitions and function interfaces, ideally
it is included where you would include gl.h on an SGI. The file vodevice.h
has the devices in it, and it is included where you would include device.h
on an SGI.
.SS
The following is a brief summary of the VOGL subroutines.
.SS Using X toolkits and Sunview
.LP
For X11 and Sunview based applications, it is posible for VOGL to use a window that is supplied by that application's
toolkit. Under these circumstances, the toolkit is is responsible for handling
of all input events, and VOGL simply draws into the supplied  window.
These calls are only available from C. Also see the directories examples/xt,
examples/xview and examples/sunview.

For X based toolkits the following two calls may be used:
.TP
.I vo_xt_window(display, xwin, width, height)
Tells VOGL to use the supplied window 
.IB xwin
.nf

	vo_xt_window(display, xwin, width, height)
		Display	*display;
		Window	xwin;
		int	width, height;

.fi
This routine should be called before calling "ginit()".
.TP
.I vo_xt_win_size(width, height)
Tells VOGL that the supplied window has changed size.
.nf

	vo_xt_win_size(width, height)
		int	width, height;

.fi
.TP
.I vo_xt_get_display()
Returns the current display that VOGL beleives it is using.
.nf
        Display *
        vo_xt_get_display()

.fi
.TP
.I vo_xt_get_window()
Returns the current window that VOGL beleives it is using.
.nf
        Window
        vo_xt_get_window()

.fi
.TP
.I vo_xt_get_GC()
Returns the current Graphics Context that VOGL beleives it is using.
.nf
        GC
        vo_xt_get_GC()

.fi

.TP

For sunview based applications the following two calls may be used:
.TP
.I vo_sunview_canvas(canvas, width, height)
Tells VOGL to use the supplied sunview canvas 
.IB canvas
.TP
.nf

	vo_sunview_canvas(canvas, width, height)
		Canvas	canvas;
		int	width, height;

.fi

This routine should be called before calling "ginit()".

.TP
.I vo_sunview_canvas_size(width, height)
Tells VOGL that the supplied canvas has changed size.
.nf

	vo_sunview_canvas_size(width, height)
		int	width, height;

.fi

.SS Device routines.
.TP
.I vinit(device)
Tell VOGL what the device is. This routine needs to be called if
the environment variable VDEVICE isn't set, or if the value in VDEVICE
is not to be used.
.nf
                
	Fortran:
		subroutine vinit(device, len)
		character *(*) device
		integer len

	C:    
		vinit(device);
		char     *device;

	Note 1 :- Current available devices are:
		    tek - tektronix 4010 and compatibles
		    hpgl - HP Graphics language and compatibles
		    dxy - roland DXY plotter language
		    postscript - monochrome postscript devices
		    ppostscript - monochrome postscript devices (portrait mode)
		    cps - colour postscript devices
		    pcps - colour postscript devices (portrait mode)
		    grx - the GRX library that is part of DJGPP. 
				- (little tested)
		    sun - Sun workstations running sunview
		    X11 - X windows (SUN's Openwindows etc etc)
		    decX11 - the decstation (old) window manager
			     This is only included in case you need it.
		    apollo - Apollo workstations
		    NeXT   - NeXTStep
		    hercules - IBM PC hercules graphics card
		    cga - IBM PC cga graphics card
		    ega - IBM PC ega graphics card
		    vga - IBM PC vga graphics card
		    sigma - IBM PC sigma graphics card.
		    mswin - MS-windoze (little tested).

		    Sun, X11, decX11, apollo, hercules, cga
		    and ega support double buffering.

		    


	Note 2 :- If device is a NULL or a null string the value
		of the environment variable "VDEVICE" is taken as the
		device type to be opened.

	Note 3 :- after init it is wise to explicitly
		clear the screen.

	e.g.: in C
		color(BLACK);
		clear();

	or    in Fortran
		call color(BLACK)
		call clear

.fi
.TP
.I ginit()
Open the graphics device and do the basic initialisation. This routine
is marked for obsolescence. The routine
.I winopen
(see below) should be used instead.
Note: this automatically causes a REDRAW event to appear as the first event
in the event queue.
.nf
	
	Fortran:
		subroutine ginit

	C:
		ginit()

.fi
.TP
.I winopen(title)
Open the graphics device and do the basic initialisation. This routine
should be used instead of
.I ginit.
Note: this automatically causes a REDRAW event to appear as the first event
in the event queue.
.nf
	
	Fortran:
		subroutine winopen(title, len)
		character*(*) title
		integer len

	C:
		winopen(title)
			char	*title;

.fi
.TP
.I gexit()
Reset the window/terminal (must be the last VOGL routine called)
.nf

	Fortran:
		subroutine gexit

	C:
		gexit()

.fi
.TP
.I voutput(path)
Redirect output from *next* ginit to file given by path. This routine only
applies to devices drivers that write to stdout e.g. postscript and hpgl.
.nf

	Fortran:
		subroutine voutput(path, len)
		character*(*) path
		integer len

	C:
		voutput(path)
			char	*path;

.fi
.TP
.I vnewdev(device)
Reinitialize VOGL to use a new device without changing attributes, viewport
etc.
(eg. window and viewport specifications)
.nf
	
	Fortran:
		subroutine vnewdev(device, len)
		character *(*) device
		integer len

	C:
		vnewdev(device)
			char *device;

.fi
.I getplanes()
Returns the number of bit planes (or color planes) for a particular
device. The number of colors displayable by the device is then 2**(nplanes-1)
.nf
	
	Fortran:
		integer function  getplanes()

	C:
		long
		getplanes()

.fi
.SS Routines for controling flushing or syncronisation of the display.
On some devices (particularly X11) considerable speedups in display
can be achieved by not flushing each graphics primitive call to the
actual display until necessary. VOGL automatically delays flushing
under in following cases:
.nf
	
	- Within a callobj() call.
	- Within curves and patches.
	- Within bgn*/end* calls.
	- When double buffering (the flush is only done withing swapbuffers).

.fi
There are two user routines (which are NOT GL compatible) that can be used
to control flushing.
.TP
.I vsetflush(yesno)
Set global flushing status. If yesno = 0 (.false.) then don't do any
flushing (except in swapbuffers(), or vflush()). If yesno = 1 (.true.) 
then do the flushing as described above.
.nf

	Fortran:
		subroutine vsetflush(yesno)
		logical yesno

	C:
		void
		vsetflush(yesno)
			int	yesno;
.fi
.TP
.I vflush()
Call the device flush or syncronisation routine. This forces a flush.
.nf

	Fortran:
		subroutine vflush

	C:
		void
		vflush();
.fi
.SS Routines For Setting Up Windows.
Some devices are basically window orientated - like sunview and X11. You
can give VOGL some information about the window that it will use with these
routines.
These can make your code very device dependent. Both routines take 
arguments which are in device space. (0, 0) is the bottom left hand corner
in device space. To have any effect these routines must be called before ginit
or winopen.
For the X11 device, an entry may be made in your .Xdefaults file of the
form vogl.Geometry =150x500+550+50 (where you specify your geometry as
you please).
.TP
.I prefposition(x1, x2, y1, y2)
Specify the preferred position of the window opened by the *next* winopen.
.nf

	Fortran:
		subroutine prefposition(x1, x2, y1, y2)
		integer x1, x2, y1, y2

	C:
		prefposition(x1, x2, y1, y2)
			long	x1, x2, y1, y2

.fi
.TP
.I prefsize(width, height)
Specify the preferred width and height of the window opened by the
*next* winopen.
.nf

	Fortran:
		subroutine prefsize(width, height)
		integer width, height

	C:
		prefsize(width, height)
			long	width, height;

.fi
.TP
.I reshapeviewport
This is occasionally used in Iris GL if a REDRAW event rolls up. While
VOGL is unlikely to ever provide a REDRAW event (except possibly the first event
in the event queue) the call is provided for
compatibility.
.nf

	Fortran:
		subroutine reshap

	C:
		reshapeviewport()

.fi
.SS General Routines.
.TP
.I clear()
Clears the current viewport to the current colour.
.nf
                
	Fortran:
		subroutine clear

	C:    
		clear()

.fi
.TP
.I color(col)
Set the current colour. The standard colours are as follows:
.nf
	black = 0       red = 1         green = 2       yellow = 3
	blue = 4        magenta = 5     cyan = 6        white = 7.

	These are included in vogl.h as:

	   BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN and WHITE.

	When using fortran these are included in fvogl.h as
	   BLACK, RED, GREEN, YELLOW, BLUE, MAGENT, CYAN and WHITE.
.fi
.nf

	Fortran:
		subroutine color(col)
		integer col

	C:    
		color(col)
			Colorindex	col;

.fi
.TP 
.I colorf(col)
Same as 
.I color
only it takes a floating point argument. In Iris GL there
are sometimes good reasons for using this routine over
.I color.
See the GL manual for more details.
.nf

	Fortran:
		subroutine colorf(col)
		real col

	C:    
		colorf(col)
			float	col;

.fi
.TP
.I mapcolor(indx, red, green, blue)
Set the color map index indx to the color represented by (red, green, blue).
If the device has no color map this call does nothing.
.nf

	Fortran:
		subroutine mapcolor(indx, red, green, blue)
		integer indx, red, green, blue

	C:    
		mapcolor(indx, red, green, blue)
			Colorindex	indx;
			short		red, green, blue;

.fi
.TP
.I defbasis(id, mat)
Define basis number id to be the matrix mat.
.nf

	Fortran:
		subroutine defbasis(id, mat)
		integer id
		real mat(4, 4)

	C:
		defbasis(id, mat)
			short	id;
			Matrix	mat;

.fi
.TP 
.I polymode(mode)
.I NOTE:- For this call to
.I have any effect
it must have been
.I conditionally compilied
into the library. (See polygons.c for details)
Control the filling of polygons. It expects one of the following
PYM_LINE, which means only the edges of the polygon will be drawn
and PYM_FILL which means fill the polygon (the default). PYM_POINT
and PYM_HOLLOW
are also recognised but they don't behave quite as they would
with SGI GL.

Also note that in Fortran the corresponding constants are truncated to
PYM_LI, PYM_FI, PYM_PO and PYM_HO respectivly. These appear in fvogl.h.

.nf

	Fortran:
		subroutine polymode(mode)
		integer mode

	C:
		polymode(mode)
			long	mode;

.fi
.SS The Device Queue and Valuator Routines.
The available devices are defined in the header files vodevice.h and
for FORTRAN fvodevice.h
.TP
.I qdevice(dev)
Enable a device. Note: in VOGL the queue is of length 1.
.nf

	Fortran:
		subroutine qdevice(dev)
		integer dev

	C:    
		qdevice(dev)
			Device	dev;

.fi
.TP
.I unqdevice(dev)
Disable a device. 
.nf

	Fortran:
		subroutine qdevice(dev)
		integer dev

	C:    
		qdevice(dev)
			Device	dev;

.fi
.TP
.I qread(data)
Read an event from the device queue. This routines blocks until
something happens. Note: it is important to have called qdevice
before doing this.
.nf

	Fortran:
		integer function qread(data)
		integer*2 data

	C:    
		long qread(data)
			short	*data;

.fi
.TP
.I isqueued(dev)
Check to see if device dev is enabled for queueing.
.nf

	Fortran:
		logical function isqueued(dev)
		integer dev

	C:    
		Boolean isqueued(dev)
			short	*dev;

.fi
.TP
.I qtest()
Check if there is anything in the queue. Note: in VOGL the queue
is only 1 entry deep.
.nf

	Fortran:
		logical function qtest

	C:    
		Boolean qtest()

.fi
.TP
.I qreset()
Reset the device queue. This will get rid of any pending events.
.nf

	Fortran:
		subroutine qreset

	C:
		qreset()

.fi
.TP
.I getbutton(dev)
Returns the up (0) or down (1) state of a button.
.nf

	Fortran:
		logical function getbutton(dev)
		integer dev

	C:
		Boolean getbutton(dev)
			Device	dev;

.fi
.TP
.I getvaluator(dev)
Return the current value of the valuator. Currently the only
valuators supported are MOUSEX and MOUSEY.
.nf

	Fortran:
		integer function getvaluator(dev)
		integer dev

	C:
		long getvaluator(dev)
			Device	dev;

.fi
.SS Viewport Routines.
.TP
.I viewport(left, right, bottom, top)
Specify which part of the screen to draw in. Left, right, bottom, and top
are integer values in screen coordinates.
.nf
                
	Fortran:
		subroutine viewport(left, right, bottom, top)
		integer left, right, bottom, top

	C:    
		viewport(left, right, bottom, top)
			Screencoord      left, right, bottom, top;

.fi
.TP
.I pushviewport()
Save current viewport on the viewport stack.
.nf

	Fortran:
		subroutine pushviewport

	C:    
		pushviewport()

.fi
.TP
.I popviewport()
Retrieve last pushed viewport.
.nf

	Fortran:
		subroutine popviewport

	C:    
		popviewport()

.fi
.TP
.I getviewport(left, right, bottom, top)
Returns the left, right, bottom and top limits of the current viewport
in screen coordinates.
.nf
                
	Fortran:
		subroutine getviewport(left, right, bottom, top)
		integer*2 left, right, bottom, top

	C:    
		getviewport(left, right, bottom, top)
			Screencoord      *left, *right, *bottom, *top;

.fi
.SS Attribute Stack Routines.
.LP
The attribute stack contains details such as current color, current line style 
and width, and the current font number. If you
need to prevent object calls form changing these, use
.I pushattributes
before the call and
.I popattributes
after.
.TP
.I pushattributes()
Save the current attributes on the attribute stack.
.nf

	Fortran:
		subroutine pushattributes

	C:    
		pushattributes()
.fi
.TP
.I popattributes()
Restore the attributes to what they were at the last
.I pushattribute().
.nf

	Fortran:
		subroutine popattributes

	C:    
		popattributes()

.fi
.SS Projection Routines.
.LP
All the projection routines define a new transformation matrix, and 
consequently the world units. Parallel projections are defined by ortho or
ortho2. Perspective projections can be defined by perspective and window.
Note the types Angle, etc, are defined in vogl.h. Remember angles are in tenths
of degrees.
.TP
.I ortho(left, right, bottom, top, near, far)
Define x (left, right), y (bottom, top), and z (near, far) clipping
planes. The near and far clipping planes are actually specified as
distances along the line of sight. These distances can also be negative.
The actual location of the clipping planes is z = -near_d and z = -far_d.
.nf

	Fortran:
		subroutine ortho(left, right, bottom, top, near_d, far_d)
		real left, right, bottom, top, near_d, far_d

	C:
		ortho(left, right, bottom, top, near_d, far_d)
			Coord 	left, right, bottom, top, near_d, far_d;

.fi
.TP
.I ortho2(left, right, bottom, top)
Define x (left, right), and y (bottom, top) clipping planes.
.nf

	Fortran:
		subroutine ortho2(left, right, bottom, top)
		real left, right, bottom, top

	C:
		ortho2(left, right, bottom, top)
			float	left, right, bottom, top;

.fi
.TP
.I perspective(fov, aspect, near, far)
Specify a perspective viewing pyramid in world coordinates by
giving a field of view, aspect ratio and the distance from the
eye of the near and far clipping plane.

The fov, specifies the field of view in the y direction. It is the range
of the area that is being viewed. The aspect ratio is the ratio x/y 
(width/height) which determines the fov in the x direction.

.nf

	Fortran:
		subroutine perspective(fov, aspect, near, far)
		integer fov
		real aspect, near, far

	C:
		perspective(fov, aspect, near, far)
			Angle 	fov;
			float	aspect;
			Coord	near, far;

.nf
.TP
.I window(left, right, bot, top, near, far)
Specify a perspective viewing pyramid in world coordinates by
giving the rectangle closest to the eye (ie. at the near clipping
plane) and the distances to the near and far clipping planes.
.nf
                
	Fortran:
		subroutine window(left, right, bot, top, near, far)
		real left, right, bot, top, near, far

	C:    
		window(left, right, bot, top, near, far)
			float     left, right, bot, top, near, far;

.fi
.SS Matrix Stack Routines.
.TP
.I pushmatrix()
Save the current transformation matrix on the matrix stack.
.nf

	Fortran:
		subroutine pushmatrix

	C:
		pushmatrix()

.fi
.TP
.I popmatrix()
Retrieve the last matrix pushed and make it the current transformation
matrix.
.nf

	Fortran:
		subroutine popmatrix

	C:
		popmatrix()

.fi
.SS Viewpoint Routines.
.LP
Viewpoint routines alter the current tranformation matrix.
.TP
.I polarview(dist, azim, inc, twist)
Specify the viewer's position in polar coordinates by giving
the distance from the viewpoint to the world origin,
the azimuthal angle in the x-y plane, measured from the y-axis,
the incidence angle in the y-z plane, measured from the z-axis,
and the twist angle about the line of sight.
.nf

	Fortran:
		subroutine polarview(dist, azim, inc, twist)
		real dist
		integer azim, inc, twist

	C:
		polarview(dist, azim, inc, twist)
			Coord	dist;
			Angle	azim, inc, twist;

.fi
.TP
.I
lookat(vx, vy, vz, px, py, pz, twist)
Specify the viewer's position by giving a viewpoint and a
reference point in world coordinates. A twist about the line
of sight may also be given.

The viewpoint is at (vx, vy, vz). The reference (or viewed) point is
at (px, py, pz). ie the line of site is from v to p. The twist parameter
is a righthand rotation about the line of site.

.nf

	Fortran:
		subroutine lookat(vx, vy, vz, px, py, pz, twist)
		real vx, vy, vz, px, py, pz
		integer twist

	C:
		lookat(vx, vy, vz, px, py, pz, twist)
			float	vx, vy, vz, px, py, pz;
			Angle	twist;

.fi
.SS Move Routines.
.LP
There are variations on all these routines that end in 's' and also
end in 'i'. In the case of the 's' variations they take arguments
of type Scoord in C and integer*2 in FORTRAN. In the case of the 'i'
variations they take arguments of type Icoord in C and integer in
FORTRAN.
.TP
.I move(x, y, z)
Move current graphics position to (x, y, z). (x, y, z) is a point in
world coordinates.
.nf

	Fortran:
		subroutine move(x, y, z)
		real x, y, z

	C:    
		move(x, y, z)
			Coord	x, y, z;

.fi
.TP
.I rmv(deltax, deltay, deltaz)
Relative move. deltax, deltay, and deltaz are offsets in world
units.
.nf

	Fortran:
		subroutine rmv(deltax, deltay, deltaz)
		real deltax, deltay, deltaz

	C:    
		rmv(deltax, deltay, deltaz)
			Coord   deltax, deltay, deltaz;

.fi
.TP
.I move2(x, y)
Move graphics position to point (x, y). (x, y) is a point in world
coordinates.
.nf

	Fortran:
		subroutine move2(x, y)
		real x, y

	C:    
		move2(x, y)
			Coord	x, y;

.fi
.TP
.I rmv2(deltax, deltay)
Relative move2. deltax and deltay are offsets in world units.
.nf

	Fortran:
		subroutine rmv2(deltax, deltay)
		real deltax, deltay

	C:    
		rmv2(deltax, deltay)
			Coord	deltax, deltay;

.fi

.SS Line routines.
.LP
These  routines set the line style and line width if the current device
is capable of doing so. 
.TP
.I deflinestyle(n, style)
Define a line style and binds it to the integer n. The  line style is a
bit pattern of 16 bits width.
.nf
	Fortran:
		subroutine deflin(n, style)
		integer	n
		integer style

	C:
		deflinestyle(n, style)
			short	n;
			Linestyle	style;

.fi

.TP
.I setlinestyle(n)
Sets the current line style.
.nf
	Fortran:
		subroutine setlin(n)
		integer	n

	C:
		setlinestyle(n)
			short	n;

.fi

.TP
.I linewidth(n)
Sets the current line width to 'n' pixels wide.
.nf
	Fortran:
		subroutine linewi(n)
		integer	n

	C:
		linewidth(n)
			short	n;

.fi

	
.SS Drawing Routines.
.LP
There are variations on all these routines that end in 's' and also
end in 'i'. In the case of the 's' variations they take arguments
of type Scoord in C and integer*2 in FORTRAN. In the case of the 'i'
variations they take arguments of type Icoord in C and integer in
FORTRAN.
.TP
.I draw(x, y, z)
Draw from current graphics position to (x, y, z). (x, y, z) is a point in
world coordinates.
.nf

	Fortran:
		subroutine draw(x, y, z)
		real x, y, z

	C:    
		draw(x, y, z)
			Coord	x, y, z;

.fi
.TP
.I rdr(deltax, deltay, deltaz)
Relative draw. deltax, deltay, and deltaz are offsets in world units.
.nf

	Fortran:
		subroutine rdr(deltax, deltay, deltaz)
		real deltax, deltay, deltaz

	C:    
		rdr(deltax, deltay, deltaz)
			Coord   deltax, deltay, deltaz;

.fi
.TP
.I draw2(x, y)
Draw from current graphics position to point (x, y). (x, y) is a point in
world coordinates.
.nf

	Fortran:
		subroutine draw2(x, y)
		real x, y

	C:    
		draw2(x, y)
			Coord	x, y;

.fi
.TP
.I rdr2(deltax, deltay)
Relative draw2. deltax and deltay are offsets in world units.
.nf

	Fortran:
		subroutine rdr2(deltax, deltay)
		real deltax, deltay

	C:    
		rdr2(deltax, deltay)
			Coord   deltax, deltay;


.fi
.SS Vertex calls.
.LP
There are calls which we term 'vertex calls' which simply specify a point
in 4D, 3D or 2D. These calls take an array which specifies the coordinates
of the point. The interpretation of these points is described below.

.I v4d(v)
Specify a vertex(point) in 4D using double precision numbers.
.nf

	Fortran:
		subroutine v4d(v)
		real *8 v(4)

	C:
		v4d(v)
			double v[4];


.fi
.I v4f(v)
Specify a vertex(point) in 4D using single precision floating point numbers.
.nf

	Fortran:
		subroutine v4f(v)
		real v(4)

	C:
		v4f(v)
			float v[4];


.fi
.I v4i(v)
Specify a vertex(point) in 4D using integer numbers
.nf

	Fortran:
		subroutine v4i(v)
		integer v(4)

	C:
		v4i(v)
			long v[4];


.fi
.I v4s(v)
Specify a vertex(point) in 4D using short integer numbers
.nf

	Fortran:
		subroutine v4s(v)
		integer *2  v(4)

	C:
		v4s(v)
			short v[4];


.fi

.LP
There are also equivalent calls for 3D points (v3d, v3f, v3i, v3s) 
and 2D points (v2d, v2f, v2i, v2s). The only difference is the number
of elements that each vertex needs to be specified. It should also be
noted the the different data types (ie. double, float, long and short)
are merely different ways of representing the same basic coordinate
data (calling v3s with v[] = {100,200,200} is the same as calling v3f
with v[] = {100.0, 200.0, 200.0}).

The way these points are interpreted depends on what mode
has be set up with one of the calls
.I bgnpoint, bgnline, bgnclosedline or bgnpolygon.
The
.I bgnpoint
call specifies that the next series of vertex calls are specifying a chain
of points (dots) to be drawn. A 
.I bgnpoint
is terminated with a
.I endpoint
call.
.nf

	Fortran:
		subroutine bgnpoint

	C:
		bgnpoint()

	Fortran:
		subroutine endpoint

	C:
		endpoint()


.fi

The
.I bgnline
call specifies that the next series of vertex calls are specifying the points
on a polyline. A
.I bgnline
 is terminated with a
.I endline 
call.
.nf

	Fortran:
		subroutine bgnline

	C:
		bgnline()

	Fortran:
		subroutine endline

	C:
		endline()


.fi

The 
.I bgnclosedline
call is similar to the
.I bgnline
except that when 
.I endclosedline
is called the first point given (ie. the one first after the bgnclosedline
call) is joined to the last point given (ie. the one just before the
endclosedline call).
.nf

	Fortran:
		subroutine bgncloseline

	C:
		bgnclosedline()

	Fortran:
		subroutine endclosedline

	C:
		endclosedline()


.fi

The
.I bgnpolygon
call specifies that the next series of vertex calls are defining a polygon.
When
.I endpolygon
is called, the polygon is closed and filled (or drawn as an outline depending
on the mode that has been set with the 
.I polymode 
call if this call has been compilied into the library.

.nf

	Fortran:
		subroutine bgnpolygon

	C:
		bgnpolygon()

	Fortran:
		subroutine endpolygon

	C:
		endpolygon()



.fi
.SS Arcs and Circles.
.LP
There are variations on all these routines that end in 's' and also
end in 'i'. In the case of the 's' variations they take arguments
of type Scoord in C and integer*2 in FORTRAN. In the case of the 'i'
variations they take arguments of type Icoord in C and integer in
FORTRAN.
.TP
.I circleprecision(nsegs)
Set the number of line segments making up a circle. Default is
currently 32. The number of segments in an arc is
calculated from nsegs according the span of the arc.
This routine is only available in VOGL.
.nf
	Fortran:
		subroutine circleprecision(nsegs)
		integer	nsegs
	C:
		circleprecision(nsegs)
			int	nsegs;

.fi
.TP
.I arc(x, y, radius, startang, endang)
Draw an arc. x, y, and radius are values in world units.
.nf

	Fortran:
		subroutine arc(x, y, radius, startang, endang)
		real x, y, radius;
		integer startang, endang;
	C:    
		arc(x, y, radius, startang, endang)
			Coord  x, y, radius;
			Angle  startang, endang;

.fi
.TP
.I arcf(x, y, radius, startang, endang)
Draw a filled arc. x, y, and radius are values in world units. (How
the filling is done may be changed by calling 
.I polymode
, if this call has been compilied into the library).
.nf

	Fortran:
		subroutine arcf(x, y, radius, startang, endang)
		real x, y, radius;
		integer startang, endang;
	C:    
		arcf(x, y, radius, startang, endang)
			Coord  x, y, radius;
			Angle  startang, endang;

.fi
.TP
.I circ(x, y, radius)
Draw a circle. x, y, and radius are values in world units. 
.nf

	Fortran:
		subroutine circ(x, y, radius)
		real	x, y, radius
	C:    
		circ(x, y, radius)
			Coord	x, y, radius;

.fi
.TP
.I circf(x, y, radius)
Draw a filled circle. x, y, and radius are values in world units.  How
the filling is done may be changed by calling
.I polymode.
.nf

	Fortran:
		subroutine circf(x, y, radius)
		real	x, y, radius
	C:    
		circf(x, y, radius)
			Coord	x, y, radius;

.fi
.SS Curve Routines.
.TP
.I curvebasis(id)
Set the basis matrix for a curve to the matrix referenced by id.
The matrix and it's id are tied together with a call to
.I defbasis.
.nf

	Fortran: 
		subroutine curvebasis(id)
		integer id
	C:
		curvebasis(id)
			short	id;

.fi
.TP
.I curveprecision(nsegs)
Define the number of line segments used to draw a curve.
.nf

	Fortran: 
		subroutine curveprecision(nsegs)
		integer nsegs

	C:
		curveprecision(nsegs)
			short	nsegs;

.fi
.TP
.I rcrv(geom)
Draw a rational curve.
.nf

	Fortran: 
		subroutine rcrv(geom)
		real geom(4,4)
	C:
		rcrv(geom)
			Coord	geom[4][4];

.fi
.TP
.I rcrvn(n, geom)
Draw n - 3 rational curve segments. Note: n must be at least 4.
.nf

	Fortran: 
		subroutine rcrvn(n, geom)
		integer n
		real geom(4,n)
	C:
		rcrvn(n, geom)
			long	n;
			Coord	geom[][4];

.fi
.TP
.I crv(geom)
Draw a curve.
.nf

	Fortran: 
		subroutine crv(geom)
		real geom(3,4)
	C:
		crv(geom)
			Coord	geom[4][3];

.fi
.TP
.I crvn(n, geom)
Draw n - 3 curve segments. Note: n must be at least 4.
.nf

	Fortran: 
		subroutine crvn(n, geom)
		integer n
		real geom(3,n)
	C:
		crvn(n, geom)
			long	n;
			Coord	geom[][3];

.fi
.TP
.I curveit(n)
Draw a curve segment by iterating the top matrix in the matrix stack as
a forward difference matrix. This performs 'n' iterations.
.nf

	Fortran: 
		subroutine curveit(n)
		integer n

	C:
		curveit(n)
			short	n;

.fi
.SS Rectangles and General Polygon Routines.
.LP
See also 
.I Vertex
calls above.
The way in which filled polygons (including circles and arcs) are
treated depends on the mode that has been set with the 
.I polymode
call.
.LP
There are variations on all these routines that end in 's' and also
end in 'i'. In the case of the 's' variations they take arguments
of type Scoord in C and integer*2 in FORTRAN. In the case of the 'i'
variations they take arguments of type Icoord in C and integer in
FORTRAN.
.TP
.I rect(x1, y1, x2, y2)
Draw a rectangle. 
.nf

	Fortran:
		subroutine rect(x1, y1, x2, y2)
		real x1, y1, x1, y2
	C:    
		rect(x1, y1, x2, y2)
			Coord	x1, y1, x2, y2;

.fi
.TP
.I rectf(x1, y1, x2, y2)
Draw a filled rectangle. (How the filling is done may be changed by calling
.I polymode
, if this call has been compilied into the library).
.nf

	Fortran:
		subroutine rectf(x1, y1, x2, y2)
		real x1, y1, x1, y2
	C:    
		rectf(x1, y1, x2, y2)
			Coord	x1, y1, x2, y2;

.fi
.TP
.I poly2(n, points)
Construct a (x, y) polygon from an array of points provided by the user.
.nf

	Fortran:
		subroutine poly2(n, points)
		integer n
		real points(2, n)
	C:
		poly2(n, points)
			long	n;
			Coord	points[][2];

.fi
.TP
.I polf2(n, points)
Construct a filled (x, y) polygon from an array of points provided by the user.
(How the filling is done may be changed by calling
.I polymode
, if this call has been compilied into the library).
.nf

	Fortran:
		subroutine polf2(n, points)
		integer n
		real points(2, n)
	C:
		polf2(n,  points)
			long	n;
			Coord	points[][2];

.fi
.TP
.I poly(n, points)
Construct a polygon from an array of points provided by the user.
.nf

	Fortran:
		subroutine poly(n, points)
		integer n
		real points(3, n)
	C:
		poly(n,  points)
			long	n;
			float	points[][3];

.fi
.TP
.I polf(n, points)
Construct a filled polygon from an array of points provided by the user.
(How the filling is done may be changed by calling
.I polymode
, if this call has been compilied into the library).
.nf

	Fortran:
		subroutine polf(n, points)
		integer n
		real points(3, n)
	C:
		polf(n, points)
			long	n;
			Coord	points[][3];

.fi
.TP 
.I backface(onoff)
Turns on culling of backfacing polygons. A polygon is
backfacing if it's orientation in *screen* coords is clockwise.
.nf

	Fortran:
		subroutine backface(onoff)
		logical onoff

	C:
		backface(onoff)
			Boolean	onoff;

.fi
.TP
.I frontface(onoff)
Turns on culling of frontfacing polygons. A polygon is
frontfacing if it's orientation in *screen* coords is anticlockwise.
.nf

	Fortran:
		subroutine frontface(clockwise)
		logical onoff

	C:
		frontface(clockwise)
			Boolean	onoff;

.fi
.SS Text routines.
The original VOGLE hardware fonts "small" and "large" have the font numbers
0 and 1 respectively. The default font is 0. For X11 displays the default
fonts used by the program can be overridden by placing the following defaults
in the ~/.Xdefaults file:
.nf
	vogl.smallfont: <font name>
	vogl.largefont: <font name>
.fi
.TP
.I font(fontid)
Set the current font
.nf

	Fortran:
		subroutine font(fontid)
		integer fontid;

	C:    
		font(fontid)
			short	fontid;

.fi
.TP
.I cmov(x, y, z)
Change the current character position. The usual variations with the
extensions 'i' and 's' also apply here.
.nf

	Fortran:
		subroutine cmov(x, y, z)
		real x, y, z;

	C:    
		cmov(x, y, z)
			Coord	x, y, z;

.fi
.TP
.I cmov2(x, y)
Change the current character position in x and y. The usual variations
with the extensions 'i' and 's' also apply here.
.nf

	Fortran:
		subroutine cmov2(x, y)
		real x, y;

	C:    
		cmov2(x, y)
			Coord	x, y;

.fi
.TP
.I getheight()
Return the maximum height in the current font.
.nf

	Fortran:
		integer function getheight

	C:    
		long
		getheight()

.fi
.TP
.I strwidth(s)
Return the length of the string s in screen coords.
.nf

	Fortran:
		integer function strwidth(s, n)
			character *(*) s
			integer	n;

	C:    
		long
		strwidth(s)
			char	*s;

.fi
.TP
.TP
.I charstr(str)
Draw the text in string at the current position.
.nf

	Fortran:
		subroutine charst(str, len)
		character*(*) str
		integer len

	C:    
		charstr(str)
			char *str;

.fi
.SS Transformations Routines.
.LP
All transformations are cumulative, so if you rotate something and then
do a translate you are translating relative to the rotated axes. If you need
to preserve the current transformation matrix use pushmatrix(), do the
drawing, and then call popmatrix() to get back where you were before.
.TP
.I translate(x, y, z)
Set up a translation. 
.nf

	Fortran:
		subroutine translate(x, y, z)
		real x, y, z
	C:
		translate(x, y, z)
			Coord	x, y, z;

.fi
.TP
.I scale(x, y, z)
Set up scaling factors in x, y, and z axis.
.nf

	Fortran:
		subroutine scale(x, y, z)
		real x, y, z

	C:
		scale(x, y, z)
			Coord	x, y, z;

.fi
.TP
.I rot(angle, axis)
Set up a rotation in axis axis. Axis is one of 'x', 'y', or 'z'.
The angle in this case is a real number in degrees.
.nf

	Fortran:
		subroutine rot(angle, axis)
		real angle
		character axis

	C:
		rot(angle, axis)
			float	angle;
			char	axis;

.fi
.TP
.I rotate(angle, axis)
Set up a rotation in axis axis. Axis is one of 'x', 'y', or 'z', and
the angle is in tenths of degrees. Makes you feel sentimental doesn't it.
.nf

	Fortran:
		subroutine rotate(angle, axis)
		integer angle
		character axis

	C:
		rotate(angle, axis)
			Angle	angle;
			char	axis;

.fi
.SS Patch Routines.
.TP
.I patchbasis(tbasisid, ubasisid)
Define the t and u basis matrix id's of a patch. It is assumed that tbasisid
and ubasisid have matrices associated with them already (this is done using
the
.I defbasis
call).
.nf

	Fortran:
		subroutine patchbasis(tid, uid)
		integer tid, uid

	C:
		patchbasis(tid, ubid)
			long	tid, uid

.fi
.TP
.I patchprecision(tseg, useg)
Set the minimum number of line segments making up curves in a patch.
.nf

	Fortran:
		subroutine patchprecision(tseg, useg)
		integer tseg, useg

	C:
		patchprecision(tseg, useg)
			long     tseg, useg;

.fi
.TP
.I patchcurves(nt, nu)
Set the number of curves making up a patch.
.nf

	Fortran:
		subroutine patchcurves(nt, nu)
		integer nt, nu

	C:
		patchcurves(nt, nu)
			long     nt, nu;

.fi
.TP
.I rpatch(gx, gy, gz, gw)
Draws a rational patch in the current basis, according to the geometry
matrices gx, gy, gz, and gw.
.nf

	Fortran:
		subroutine rpatch(gx, gy, gz, gw)
		real  gx(4,4), gy(4,4), gz(4,4), gw(4,4)

	C:
		rpatch(gx, gy, gz, gw)
		    Matrix  gx, gy, gz, gw;

.fi
.TP
.I patch(gx, gy, gz)
Draws a patch in the current basis, according to the geometry
matrices gx, gy, and gz.
.nf

	Fortran:
		subroutine patch(gx, gy, gz)
		real  gx(4,4), gy(4,4), gz(4,4)

	C:
		patch(gx, gy, gz)
			Matrix  gx, gy, gz;

.fi
.SS Point Routines.
.LP
There are variations on all these routines that end in 's' and also
end in 'i'. In the case of the 's' variations they take arguments
of type Scoord in C and integer*2 in FORTRAN. In the case of the 'i'
variations they take arguments of type Icoord in C and integer in
FORTRAN.
.TP
.I pnt(x, y, z)
Draw a point at x, y, z
.nf

	Fortran:
		subroutine pnt(x, y, z)
		real x, y, z

	C:
		pnt(x, y, z)
			Coord	x, y, z;

.fi
.TP
.I pnt2(x, y)
Draw a point at x, y.
.nf

	Fortran:
		subroutine pnt2(x, y)
		real x, y

	C:
		pnt2(x, y)
			Coord	x, y;

.fi
.SS Object Routines.
.LP
Objects are graphical entities created by the drawing routines called between
.I makeobj
and
.I closeobj.
Objects may be called from within other objects. When an object
is created most of the calculations required by the drawing routines called
within it are done up to where the calculations involve the current
transformation matrix. So if you need to draw the same thing several times
on the screen but in different places it is faster to use objects than
to call the appropriate drawing routines each time.
.TP
.I makeobj(n)
Commence the object number n.
.nf

	Fortran:
		subroutine makeobj(n)
		integer n

	C:
		makeobj(n)
			Object	n;

.fi
.TP
.I closeobj()
Close the current object.
.nf

	Fortran:
		subroutine closeobj()

	C:
		closeobj()

.fi
.TP
.I genobj()
Returns a unique object identifier.
.nf

	Fortran:
		integer function genobj()

	C:
		Object
		genobj()

.fi
.TP
.I getopenobj()
Return the number of the current object.
.nf

	Fortran:
		integer function getopenobj()

	C:
		Object
		getopenobj()

.fi
.TP
.I callobj(n)
Draw object number n.
.nf

	Fortran:
		subroutine callobj(n)
		integer n

	C:
		callobj(n)
			Object	n;

.fi
.TP
.I isobj(n)
Returns non-zero if there is an object of number n.
.nf

	Fortran:
		logical function isobj(n)
		integer n

	C:
		Boolean
		isobj(n)
			Object	n;

.fi
.TP
.I delobj(n)
Delete the object number n.
.nf

	Fortran:
		subroutine delobj(n)
		integer n

	C:
		delobj(n)
			Object	n;

.fi
.SS Double Buffering.
Where possible VOGL allows for front and back buffers
to enable things like animation and smooth updating of
the screen. Note: it isn't possible to have backbuffer and
frontbuffer true at the same time.
.TP
.I gconfig
With Iris GL you must call gconfig for things like doublebuffering
to take effect.
.nf

	Fortran:
		subroutine gconfig

	C:
		gconfig()

.fi
.TP
.I doublebuffer
Flags our intention to do double buffering.
.nf

	Fortran:
		subroutine doublebuffer

	C:
		doublebuffer()

.fi
.TP
.I singlebuffer
Switch back to singlebuffer mode.
.nf

	Fortran:
		subroutine singlebuffer

	C:
		singlebuffer()

.fi
.TP
.I backbuffer(Boolean)
Make VOGL draw in the backbuffer.
.nf

	Fortran:
		subroutine backbuffer(yesno)
			logical	yesno;
	
	C:
		backbuffer(yesno)
			Boolean	yesno;

.fi
.TP
.I frontbuffer(Boolean)
Make VOGL draw in the front buffer.
.nf

	Fortran:
		subroutine frontbuffer(yesno)
			logical	yesno;
	
	C:
		frontbuffer(yesno)
			Boolean	yesno;

.fi
.TP
.I swapbuffers()
Swap the front and back buffers.
.nf

	Fortran:
		subroutine swapbuffers

	C:
		swapbuffers()

.fi
.SS Position Routines.
.TP
.I getgpos(x, y, z, w)
Gets the current graphics position in world coords.
.nf
		
	Fortran:
		subroutine getgpos(x, y, z, w)
		real x, y, z

	C:
		getgpos(x, y, z, w)
			Coord *x, *y, *z, *w;

.fi
.TP
.I getcpos(ix, iy)
Gets the current character position in screen coords.
.nf
		
	Fortran:
		subroutine getcpo(ix, iy)
		integer ix, iy

	C:
		getcpos(ix, iy)
			Scoord *ix, *iy;

.fi
.SH BUGS
.LP
Double buffering isn't supported on all devices.
.LP
The yobbarays may be turned on or they may be turned off.
the mode that has been set with the 
.I polymode
call.
.LP
There are variations on all these routines that end in 's' and also
end in 'i'. In the case of the 's' variations they take argvogl/docs/vogl.ps010066000017740000000000002360050561260265100147530ustar00bernieroot377777770000005%!PS-Adobe-3.0
%%Creator: groff version 1.09
%%CreationDate: Tue Jul 19 08:43:51 1994
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%DocumentSuppliedResources: procset grops 1.09 0
%%Pages: 29
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
%%BeginProlog
%%BeginResource: procset grops 1.09 0
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll 
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}bind def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/FL{
currentgray exch setgray fill setgray
}bind def
/BL/fill load def
/LW/setlinewidth load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{ pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[] 0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{} def
}bind def
/PEND{
clear
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%IncludeResource: font Times-Roman
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
/Times-Roman@0 ENC0/Times-Roman RE
%%EndProlog
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 9/Times-Bold@0 SF -.18(NA)72 84 S(ME).18 E F0 -.4(VO)108 96 S
(GL \255 A v).4 E(ery ordinary GL Lik)-.15 E 2.5(eL)-.1 G(ibrary)-2.5 E
(.)-.65 E F1(DESCRIPTION)72 124.8 Q/F2 10/Times-Italic@0 SF -.3(VO)108
136.8 S(GL).3 E F0 .174(is a library of C routines which try to allo)
2.674 F 2.673(wap)-.25 G .173
(rogrammer to write programs which can be mo)-2.673 F -.15(ve)-.15 G
2.673(dt).15 G(o)-2.673 E .231(machines which ha)108 148.8 R .531 -.15
(ve t)-.2 H .231
(he Silicon Graphics GL library on them. It is based entirely on the V)
.15 F .232(OGLE graphics)-.4 F(library)108 160.8 Q 2.79(,a)-.65 G .29
(nd as a result can handle circles, curv)-2.79 F .29
(es, arcs, patches, and polygons in a de)-.15 F .29(vice independent f)
-.25 F(ash-)-.1 E .204(ion. Simple hidden line remo)108 172.8 R -.25(va)
-.15 G 2.704(li).25 G 2.704(sa)-2.704 G .204(lso a)-2.704 F -.25(va)-.2
G .204(ilable via polygon backf).25 F .205(acing. Access to hardw)-.1 F
.205(are te)-.1 F .205(xt and dou-)-.15 F .159(ble b)108 184.8 R(uf)-.2
E .159(fering of dra)-.25 F .159(wings depends on the dri)-.15 F -.15
(ve)-.25 G 3.759 -.55(r. T).15 H .159(here is also a FOR).55 F .159
(TRAN interf)-.6 F .159(ace b)-.1 F .159(ut as it goes through)-.2 F
.522(the C routines FOR)108 196.8 R .522(TRAN users are w)-.6 F .522
(arned that arrays are in ro)-.1 F .523
(w-column order in C. Both the long FOR-)-.25 F .23(TRAN names and the \
shortened six character names are supported. People interested in using\
 softw)108 208.8 R .23(are te)-.1 F(xt)-.15 E(should see the hershe)108
220.8 Q 2.5(yl)-.15 G(ibrary)-2.5 E(,)-.65 E F2(HERSHEY\(3\).)2.5 E F0
.978(Some routines are only a)108 244.8 R -.25(va)-.2 G .979
(ilable in V).25 F .979
(OGL. If you include them in programs it is advisable to put #ifdef)-.4
F -.4(VO)108 256.8 S(GL ... #endif around them. The constant V).4 E
(OGL is de\214ned whene)-.4 E -.15(ve)-.25 G 2.5(raV).15 G
(OGL header \214le is included.)-2.9 E .235
(It should be noted that there are a number of routines that tak)108
280.8 R 2.734(et)-.1 G .234(he type)-2.734 F F2(Angle)2.734 E F0 .234
(for some of their parameters.)2.734 F(All angles speci\214ed this w)108
292.8 Q(ay are actually)-.1 E F2(Inte)2.5 E -.1(ge)-.4 G 2.5(rT).1 G
(enths Of De)-3.42 E(gr)-.4 E(ees.)-.37 E F0(\(Don')5 E 2.5(ta)-.18 G
(sk!\))-2.5 E/F3 10/Times-Bold@0 SF(Include \214les.)87 321.6 Q F0 .556
(There are tw)108 333.6 R 3.056(oi)-.1 G .556(nclude \214les pro)-3.056
F .556(vided with v)-.15 F .556(ogl: v)-.2 F .556(ogl.h and v)-.2 F(ode)
-.2 E 3.057(vice.h. The)-.25 F .557(\214le v)3.057 F .557
(ogl.h has the type de\214ni-)-.2 F .368(tions and function interf)108
345.6 R .368(aces, ideally it is included where you w)-.1 F .368
(ould include gl.h on an SGI. The \214le v)-.1 F(ode-)-.2 E
(vice.h has the de)108 357.6 Q
(vices in it, and it is included where you w)-.25 E(ould include de)-.1
E(vice.h on an SGI.)-.25 E F3(The f)87 374.4 Q(ollo)-.25 E
(wing is a brief summary of the V)-.1 E(OGL subr)-.45 E(outines.)-.18 E
(Using X toolkits and Sun)87 386.4 Q(view)-.4 E F0 -.15(Fo)108 398.4 S
3.18(rX).15 G .68(11 and Sun)-3.18 F(vie)-.4 E 3.18(wb)-.25 G .68
(ased applications, it is posible for V)-3.18 F .68(OGL to use a windo)
-.4 F 3.18(wt)-.25 G .68(hat is supplied by that)-3.18 F(application')
108 410.4 Q 4.629(st)-.55 G 2.129(oolkit. Under these circumstances, th\
e toolkit is is responsible for handling of all input)-4.629 F -2.15
-.25(ev e)108 422.4 T .027(nts, and V).25 F .027(OGL simply dra)-.4 F
.027(ws into the supplied)-.15 F(windo)5.028 E 3.828 -.65(w. T)-.25 H
.028(hese calls are only a).65 F -.25(va)-.2 G .028
(ilable from C. Also see).25 F(the directories e)108 434.4 Q
(xamples/xt, e)-.15 E(xamples/xvie)-.15 E 2.5(wa)-.25 G(nd e)-2.5 E
(xamples/sun)-.15 E(vie)-.4 E -.65(w.)-.25 G -.15(Fo)108 458.4 S 2.5
(rXb).15 G(ased toolkits the follo)-2.5 E(wing tw)-.25 E 2.5(oc)-.1 G
(alls may be used:)-2.5 E F2(vo_xt_window\(display)108 475.2 Q 2.5(,x)
-.55 G(win, width, height\))-2.5 E F0 -.7(Te)144 487.2 S(lls V).7 E
(OGL to use the supplied windo)-.4 E(w)-.25 E F2(xwin)2.5 E F0 -.2(vo)
180 511.2 S(_xt_windo).2 E(w\(display)-.25 E 2.5(,x)-.65 G
(win, width, height\))-2.5 E 2.39(Display *display;)216 523.2 R -.4(Wi)
216 535.2 S(ndo).4 E 2.21(wx)-.25 G(win;)-2.21 E 22.94(int width,)216
547.2 R(height;)2.5 E
(This routine should be called before calling "ginit\(\)".)144 571.2 Q
F2(vo_xt_win_size\(width, height\))108 588 Q F0 -.7(Te)144 600 S(lls V)
.7 E(OGL that the supplied windo)-.4 E 2.5(wh)-.25 G(as changed size.)
-2.5 E -.2(vo)180 624 S(_xt_win_size\(width, height\)).2 E 22.94
(int width,)216 636 R(height;)2.5 E F2(vo_xt_g)108 664.8 Q
(et_display\(\))-.1 E F0(Returns the current display that V)144 676.8 Q
(OGL belei)-.4 E -.15(ve)-.25 G 2.5(si).15 G 2.5(ti)-2.5 G 2.5(su)-2.5 G
(sing.)-2.5 E(Display *)164 688.8 Q -.2(vo)164 700.8 S
(_xt_get_display\(\)).2 E -.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)
159.41 E(1)204.28 E EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 10/Times-Italic@0 SF(vo_xt_g)108 84 Q(et_window\(\))-.1 E F0
(Returns the current windo)144 96 Q 2.5(wt)-.25 G(hat V)-2.5 E
(OGL belei)-.4 E -.15(ve)-.25 G 2.5(si).15 G 2.5(ti)-2.5 G 2.5(su)-2.5 G
(sing.)-2.5 E -.4(Wi)164 108 S(ndo).4 E(w)-.25 E -.2(vo)164 120 S
(_xt_get_windo).2 E(w\(\))-.25 E F1(vo_xt_g)108 148.8 Q(et_GC\(\))-.1 E
F0(Returns the current Graphics Conte)144 160.8 Q(xt that V)-.15 E
(OGL belei)-.4 E -.15(ve)-.25 G 2.5(si).15 G 2.5(ti)-2.5 G 2.5(su)-2.5 G
(sing.)-2.5 E(GC)164 172.8 Q -.2(vo)164 184.8 S(_xt_get_GC\(\)).2 E -.15
(Fo)108 237.6 S 2.5(rs).15 G(un)-2.5 E(vie)-.4 E 2.5(wb)-.25 G
(ased applications the follo)-2.5 E(wing tw)-.25 E 2.5(oc)-.1 G
(alls may be used:)-2.5 E F1(vo_sun)108 254.4 Q(vie)-.4 E(w_can)-.15 E
(vas\(can)-.4 E(vas, width, height\))-.4 E F0 -.7(Te)144 266.4 S(lls V)
.7 E(OGL to use the supplied sun)-.4 E(vie)-.4 E 2.5(wc)-.25 G(an)-2.5 E
-.25(va)-.4 G(s).25 E F1(can)2.5 E(vas)-.4 E F0 -.2(vo)144 295.2 S(_sun)
.2 E(vie)-.4 E(w_can)-.25 E -.25(va)-.4 G(s\(can).25 E -.25(va)-.4 G
(s, width, height\)).25 E(Can)216 307.2 Q -.25(va)-.4 G 7.21(sc).25 G
(an)-7.21 E -.25(va)-.4 G(s;).25 E 22.94(int width,)216 319.2 R(height;)
2.5 E(This routine should be called before calling "ginit\(\)".)144
355.2 Q F1(vo_sun)108 384 Q(vie)-.4 E(w_can)-.15 E
(vas_size\(width, height\))-.4 E F0 -.7(Te)144 396 S(lls V).7 E
(OGL that the supplied can)-.4 E -.25(va)-.4 G 2.5(sh).25 G
(as changed size.)-2.5 E -.2(vo)180 420 S(_sun).2 E(vie)-.4 E(w_can)-.25
E -.25(va)-.4 G(s_size\(width, height\)).25 E 22.94(int width,)216 432 R
(height;)2.5 E/F2 10/Times-Bold@0 SF(De)87 472.8 Q(vice r)-.15 E
(outines.)-.18 E F1(vinit\(de)108 484.8 Q(vice\))-.15 E F0 -.7(Te)144
496.8 S .765(ll V).7 F .765(OGL what the de)-.4 F .765
(vice is. This routine needs to be called if the en)-.25 F .765
(vironment v)-.4 F .765(ariable VDE-)-.25 F(VICE isn')144 508.8 Q 2.5
(ts)-.18 G(et, or if the v)-2.5 E(alue in VDEVICE is not to be used.)
-.25 E -.15(Fo)180 532.8 S(rtran:).15 E(subroutine vinit\(de)216 544.8 Q
(vice, len\))-.25 E(character *\(*\) de)216 556.8 Q(vice)-.25 E(inte)216
568.8 Q(ger len)-.15 E(C:)180 592.8 Q(vinit\(de)216 604.8 Q(vice\);)-.25
E 10(char *de)216 616.8 R(vice;)-.25 E(Note 1 :- Current a)180 640.8 Q
-.25(va)-.2 G(ilable de).25 E(vices are:)-.25 E
(tek - tektronix 4010 and compatibles)226 652.8 Q
(hpgl - HP Graphics language and compatibles)226 664.8 Q
(dxy - roland DXY plotter language)226 676.8 Q
(postscript - monochrome postscript de)226 688.8 Q(vices)-.25 E
(ppostscript - monochrome postscript de)226 700.8 Q
(vices \(portrait mode\))-.25 E(cps - colour postscript de)226 712.8 Q
(vices)-.25 E(pcps - colour postscript de)226 724.8 Q
(vices \(portrait mode\))-.25 E -.4(VO)72 768 S(GL 1.2.8).4 E
(12 Oct 1993)159.41 E(2)204.28 E EP
%%Page: 3 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E(grx - the GRX library that is part of DJGPP)226 84 Q(.)-1.11 E 2.5
(-\()288 96 S(little tested\))-2.5 E(sun - Sun w)226 108 Q
(orkstations running sun)-.1 E(vie)-.4 E(w)-.25 E(X11 - X windo)226 120
Q(ws \(SUN')-.25 E 2.5(sO)-.55 G(penwindo)-2.5 E(ws etc etc\))-.25 E
(decX11 - the decstation \(old\) windo)226 132 Q 2.5(wm)-.25 G(anager)
-2.5 E(This is only included in case you need it.)264.5 144 Q
(apollo - Apollo w)226 156 Q(orkstations)-.1 E 5(NeXT -)226 168 R
(NeXTStep)2.5 E(hercules - IBM PC hercules graphics card)226 180 Q(cg)
226 192 Q 2.5(a-I)-.05 G(BM PC cg)-2.5 E 2.5(ag)-.05 G(raphics card)-2.5
E -2.25 -.15(eg a)226 204 T 2.5(-I)2.65 G(BM PC e)-2.5 E .1 -.05(ga g)
-.15 H(raphics card).05 E(vg)226 216 Q 2.5(a-I)-.05 G(BM PC vg)-2.5 E
2.5(ag)-.05 G(raphics card)-2.5 E(sigma - IBM PC sigma graphics card.)
226 228 Q(mswin - MS-windoze \(little tested\).)226 240 Q
(Sun, X11, decX11, apollo, hercules, cg)226 264 Q(a)-.05 E(and e)226 276
Q .1 -.05(ga s)-.15 H(upport double b).05 E(uf)-.2 E(fering.)-.25 E
(Note 2 :- If de)180 336 Q(vice is a NULL or a null string the v)-.25 E
(alue)-.25 E(of the en)216 348 Q(vironment v)-.4 E
(ariable "VDEVICE" is tak)-.25 E(en as the)-.1 E(de)216 360 Q
(vice type to be opened.)-.25 E(Note 3 :- after init it is wise to e)180
384 Q(xplicitly)-.15 E(clear the screen.)216 396 Q(e.g.: in C)180 420 Q
(color\(BLA)216 432 Q(CK\);)-.4 E(clear\(\);)216 444 Q 7.5(or in)180 468
R -.15(Fo)2.5 G(rtran).15 E(call color\(BLA)216 480 Q(CK\))-.4 E
(call clear)216 492 Q/F1 10/Times-Italic@0 SF(ginit\(\))108 520.8 Q F0
.577(Open the graphics de)11 F .577
(vice and do the basic initialisation. This routine is mark)-.25 F .578
(ed for obsolescence.)-.1 F 2.515(The routine)144 532.8 R F1(winopen)
5.015 E F0 2.515(\(see belo)5.015 F 2.515(w\) should be used instead.)
-.25 F 2.514(Note: this automatically causes a)7.514 F(REDRA)144 544.8 Q
2.5(We)-.9 G -.15(ve)-2.75 G(nt to appear as the \214rst e).15 E -.15
(ve)-.25 G(nt in the e).15 E -.15(ve)-.25 G(nt queue.).15 E -.15(Fo)180
568.8 S(rtran:).15 E(subroutine ginit)216 580.8 Q(C:)180 604.8 Q
(ginit\(\))216 616.8 Q F1(winopen\(title\))108 645.6 Q F0 1.197
(Open the graphics de)144 657.6 R 1.197(vice and do the basic initialis\
ation. This routine should be used instead of)-.25 F F1(ginit.)144 669.6
Q F0 .892(Note: this automatically causes a REDRA)5.892 F 3.391(We)-.9 G
-.15(ve)-3.641 G .891(nt to appear as the \214rst e).15 F -.15(ve)-.25 G
.891(nt in the e).15 F -.15(ve)-.25 G(nt).15 E(queue.)144 681.6 Q -.15
(Fo)180 705.6 S(rtran:).15 E(subroutine winopen\(title, len\))216 717.6
Q(character*\(*\) title)216 729.6 Q -.4(VO)72 768 S(GL 1.2.8).4 E
(12 Oct 1993)159.41 E(3)204.28 E EP
%%Page: 4 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E(inte)216 84 Q(ger len)-.15 E(C:)180 108 Q(winopen\(title\))216 120
Q 16.29(char *title;)252 132 R/F1 10/Times-Italic@0 SF -.1(ge)108 160.8
S(xit\(\))-.1 E F0(Reset the windo)10.2 E
(w/terminal \(must be the last V)-.25 E(OGL routine called\))-.4 E -.15
(Fo)180 184.8 S(rtran:).15 E(subroutine ge)216 196.8 Q(xit)-.15 E(C:)180
220.8 Q(ge)216 232.8 Q(xit\(\))-.15 E F1(voutput\(path\))108 261.6 Q F0
.156(Redirect output from *ne)144 273.6 R .156(xt* ginit to \214le gi)
-.15 F -.15(ve)-.25 G 2.656(nb).15 G 2.656(yp)-2.656 G .156
(ath. This routine only applies to de)-2.656 F .157(vices dri)-.25 F
-.15(ve)-.25 G(rs).15 E(that write to stdout e.g. postscript and hpgl.)
144 285.6 Q -.15(Fo)180 309.6 S(rtran:).15 E(subroutine v)216 321.6 Q
(output\(path, len\))-.2 E(character*\(*\) path)216 333.6 Q(inte)216
345.6 Q(ger len)-.15 E(C:)180 369.6 Q -.2(vo)216 381.6 S(utput\(path\))
.2 E 16.29(char *path;)252 393.6 R F1(vne)108 422.4 Q(wde)-.15 E(v\(de)
-.15 E(vice\))-.15 E F0 1.264(Reinitialize V)144 434.4 R 1.263
(OGL to use a ne)-.4 F 3.763(wd)-.25 G -.25(ev)-3.763 G 1.263
(ice without changing attrib).25 F 1.263(utes, vie)-.2 F 1.263
(wport etc.)-.25 F(\(e)6.263 E 1.263(g. windo)-.15 F(w)-.25 E(and vie)
144 446.4 Q(wport speci\214cations\))-.25 E -.15(Fo)180 470.4 S(rtran:)
.15 E(subroutine vne)216 482.4 Q(wde)-.25 E(v\(de)-.25 E(vice, len\))
-.25 E(character *\(*\) de)216 494.4 Q(vice)-.25 E(inte)216 506.4 Q
(ger len)-.15 E(C:)180 530.4 Q(vne)216 542.4 Q(wde)-.25 E(v\(de)-.25 E
(vice\))-.25 E(char *de)252 554.4 Q(vice;)-.25 E F1 -.1(ge)144 578.4 S
(tplanes\(\)).1 E F0 .355(Returns the number of bit planes \(or color p\
lanes\) for a particular de)2.855 F .356(vice. The number)-.25 F
(of colors displayable by the de)144 590.4 Q
(vice is then 2**\(nplanes-1\))-.25 E -.15(Fo)180 614.4 S(rtran:).15 E
(inte)216 626.4 Q(ger function)-.15 E(getplanes\(\))5 E(C:)180 650.4 Q
(long)216 662.4 Q(getplanes\(\))216 674.4 Q/F2 10/Times-Bold@0 SF
(Routines f)87 703.2 Q(or contr)-.25 E(oling \215ushing or syncr)-.18 E
(onisation of the display)-.18 E(.)-.7 E F0 .386(On some de)108 715.2 R
.386(vices \(particularly X11\) considerable speedups in display can be\
 achie)-.25 F -.15(ve)-.25 G 2.886(db).15 G 2.886(yn)-2.886 G .386
(ot \215ushing each)-2.886 F .745(graphics primiti)108 727.2 R 1.045
-.15(ve c)-.25 H .746(all to the actual display until necessary).15 F
3.246(.V)-.65 G .746(OGL automatically delays \215ushing under in)-3.646
F -.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)159.41 E(4)204.28 E EP
%%Page: 5 5
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E(follo)108 84 Q(wing cases:)-.25 E 2.5(-W)144 108 S
(ithin a callobj\(\) call.)-2.9 E 2.5(-W)144 120 S(ithin curv)-2.9 E
(es and patches.)-.15 E 2.5(-W)144 132 S(ithin bgn*/end* calls.)-2.9 E
2.5(-W)144 144 S(hen double b)-2.5 E(uf)-.2 E
(fering \(the \215ush is only done withing sw)-.25 E(apb)-.1 E(uf)-.2 E
(fers\).)-.25 E(There are tw)108 168 Q 2.5(ou)-.1 G
(ser routines \(which are NO)-2.5 E 2.5(TG)-.4 G 2.5(Lc)-2.5 G
(ompatible\) that can be used to control \215ushing.)-2.5 E/F1 10
/Times-Italic@0 SF(vset\215ush\(yesno\))108 184.8 Q F0 .027
(Set global \215ushing status. If yesno = 0 \(.f)144 196.8 R .027
(alse.\) then don')-.1 F 2.527(td)-.18 G 2.527(oa)-2.527 G .327 -.15
(ny \215)-2.527 H .027(ushing \(e).15 F .026(xcept in sw)-.15 F(apb)-.1
E(uf)-.2 E(fers\(\),)-.25 E(or v\215ush\(\)\). If yesno = 1 \(.true.\))
144 208.8 Q(then do the \215ushing as described abo)5 E -.15(ve)-.15 G
(.).15 E -.15(Fo)180 232.8 S(rtran:).15 E
(subroutine vset\215ush\(yesno\))216 244.8 Q(logical yesno)216 256.8 Q
(C:)180 280.8 Q -.2(vo)216 292.8 S(id).2 E(vset\215ush\(yesno\))216
304.8 Q 22.94(int yesno;)252 316.8 R F1(v\215ush\(\))108 333.6 Q F0
(Call the de)6.01 E
(vice \215ush or syncronisation routine. This forces a \215ush.)-.25 E
-.15(Fo)180 357.6 S(rtran:).15 E(subroutine v\215ush)216 369.6 Q(C:)180
393.6 Q -.2(vo)216 405.6 S(id).2 E(v\215ush\(\);)216 417.6 Q/F2 10
/Times-Bold@0 SF(Routines F)87 434.4 Q(or Setting Up W)-.25 E(indo)-.18
E(ws.)-.1 E F0 .275(Some de)108 446.4 R .275(vices are basically windo)
-.25 F 2.775(wo)-.25 G .275(rientated - lik)-2.775 F 2.775(es)-.1 G(un)
-2.775 E(vie)-.4 E 2.775(wa)-.25 G .275(nd X11. Y)-2.775 F .275
(ou can gi)-1.1 F .575 -.15(ve V)-.25 H .275(OGL some informa-)-.25 F
.713(tion about the windo)108 458.4 R 3.213(wt)-.25 G .712
(hat it will use with these routines.)-3.213 F .712(These can mak)5.712
F 3.212(ey)-.1 G .712(our code v)-3.212 F .712(ery de)-.15 F .712
(vice depen-)-.25 F .092(dent. Both routines tak)108 470.4 R 2.592(ea)
-.1 G -.18(rg)-2.592 G .092(uments which are in de).18 F .092
(vice space. \(0, 0\) is the bottom left hand corner in de)-.25 F(vice)
-.25 E 1.028(space. T)108 482.4 R 3.528(oh)-.8 G -2.25 -.2(av e)-3.528 H
(an)3.728 E 3.528(ye)-.15 G -.25(ff)-3.528 G 1.027
(ect these routines must be called before ginit or winopen.).25 F -.15
(Fo)6.027 G 3.527(rt).15 G 1.027(he X11 de)-3.527 F 1.027(vice, an)-.25
F .308(entry may be made in your .Xdef)108 494.4 R .308
(aults \214le of the form v)-.1 F .308
(ogl.Geometry =150x500+550+50 \(where you spec-)-.2 F
(ify your geometry as you please\).)108 506.4 Q F1(pr)108 523.2 Q
(efposition\(x1, x2, y1, y2\))-.37 E F0
(Specify the preferred position of the windo)144 535.2 Q 2.5(wo)-.25 G
(pened by the *ne)-2.5 E(xt* winopen.)-.15 E -.15(Fo)180 559.2 S(rtran:)
.15 E(subroutine prefposition\(x1, x2, y1, y2\))216 571.2 Q(inte)216
583.2 Q(ger x1, x2, y1, y2)-.15 E(C:)180 607.2 Q
(prefposition\(x1, x2, y1, y2\))216 619.2 Q 15.72(long x1,)252 631.2 R
(x2, y1, y2)2.5 E F1(pr)108 660 Q(efsize\(width, height\))-.37 E F0
(Specify the preferred width and height of the windo)144 672 Q 2.5(wo)
-.25 G(pened by the *ne)-2.5 E(xt* winopen.)-.15 E -.15(Fo)180 696 S
(rtran:).15 E(subroutine prefsize\(width, height\))216 708 Q(inte)216
720 Q(ger width, height)-.15 E -.4(VO)72 768 S(GL 1.2.8).4 E
(12 Oct 1993)159.41 E(5)204.28 E EP
%%Page: 6 6
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E(C:)180 84 Q(prefsize\(width, height\))216 96 Q 15.72(long width,)
252 108 R(height;)2.5 E/F1 10/Times-Italic@0 SF -.37(re)108 136.8 S
(shape).37 E(vie)-.15 E(wport)-.15 E F0 .196
(This is occasionally used in Iris GL if a REDRA)144 148.8 R 2.696(We)
-.9 G -.15(ve)-2.946 G .195(nt rolls up. While V).15 F .195
(OGL is unlik)-.4 F .195(ely to e)-.1 F -.15(ve)-.25 G(r).15 E(pro)144
160.8 Q .538(vide a REDRA)-.15 F 3.038(We)-.9 G -.15(ve)-3.288 G .538
(nt \(e).15 F .538(xcept possibly the \214rst e)-.15 F -.15(ve)-.25 G
.538(nt in the e).15 F -.15(ve)-.25 G .538(nt queue\) the call is pro)
.15 F(vided)-.15 E(for compatibility)144 172.8 Q(.)-.65 E -.15(Fo)180
196.8 S(rtran:).15 E(subroutine reshap)216 208.8 Q(C:)180 232.8 Q
(reshape)216 244.8 Q(vie)-.25 E(wport\(\))-.25 E/F2 10/Times-Bold@0 SF
(General Routines.)87 273.6 Q F1(clear\(\))108 285.6 Q F0
(Clears the current vie)8.79 E(wport to the current colour)-.25 E(.)-.55
E -.15(Fo)180 309.6 S(rtran:).15 E(subroutine clear)216 321.6 Q(C:)180
345.6 Q(clear\(\))216 357.6 Q F1(color\(col\))108 386.4 Q F0
(Set the current colour)144 398.4 Q 2.5(.T)-.55 G
(he standard colours are as follo)-2.5 E(ws:)-.25 E(black = 0)180 410.4
Q(red = 1)17.5 E(green = 2)22.5 E(yello)17.5 E 2.5(w=3)-.25 G(blue = 4)
180 422.4 Q(magenta = 5)20 E -.15(cy)12.5 G(an = 6).15 E(white = 7.)20 E
(These are included in v)180 446.4 Q(ogl.h as:)-.2 E(BLA)187.5 470.4 Q
(CK, RED, GREEN, YELLO)-.4 E 1.84 -.92(W, B)-.35 H(LUE, MA).92 E(GENT)
-.4 E(A, CY)-.93 E(AN and WHITE.)-1.2 E
(When using fortran these are included in fv)180 494.4 Q(ogl.h as)-.2 E
(BLA)187.5 506.4 Q(CK, RED, GREEN, YELLO)-.4 E 1.84 -.92(W, B)-.35 H
(LUE, MA).92 E(GENT)-.4 E 2.5(,C)-.74 G -1.2(YA)-2.5 G 2.5(Na)1.2 G
(nd WHITE.)-2.5 E -.15(Fo)180 530.4 S(rtran:).15 E
(subroutine color\(col\))216 542.4 Q(inte)216 554.4 Q(ger col)-.15 E(C:)
180 578.4 Q(color\(col\))216 590.4 Q(Colorinde)252 602.4 Q 27.15(xc)-.15
G(ol;)-27.15 E F1(colorf\(col\))108 631.2 Q F0 .144(Same as)144 643.2 R
F1(color)2.644 E F0 .144(only it tak)2.644 F .144
(es a \215oating point ar)-.1 F .143
(gument. In Iris GL there are sometimes good reasons)-.18 F
(for using this routine o)144 655.2 Q -.15(ve)-.15 G(r).15 E F1(color)
2.5 E(.)-1.11 E F0(See the GL manual for more details.)5 E -.15(Fo)180
679.2 S(rtran:).15 E(subroutine colorf\(col\))216 691.2 Q(real col)216
703.2 Q(C:)180 727.2 Q -.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)159.41
E(6)204.28 E EP
%%Page: 7 7
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E(colorf\(col\))216 84 Q 15.72(\215oat col;)252 96 R/F1 10
/Times-Italic@0 SF(mapcolor\(indx, r)108 124.8 Q(ed, gr)-.37 E
(een, blue\))-.37 E F0 .823(Set the color map inde)144 136.8 R 3.323(xi)
-.15 G .823(ndx to the color represented by \(red, green, blue\).)-3.323
F .824(If the de)5.824 F .824(vice has no)-.25 F
(color map this call does nothing.)144 148.8 Q -.15(Fo)180 172.8 S
(rtran:).15 E(subroutine mapcolor\(indx, red, green, blue\))216 184.8 Q
(inte)216 196.8 Q(ger indx, red, green, blue)-.15 E(C:)180 220.8 Q
(mapcolor\(indx, red, green, blue\))216 232.8 Q(Colorinde)252 244.8 Q
27.15(xi)-.15 G(ndx;)-27.15 E 49.5(short red,)252 256.8 R(green, blue;)
2.5 E F1(defbasis\(id, mat\))108 285.6 Q F0
(De\214ne basis number id to be the matrix mat.)144 297.6 Q -.15(Fo)180
321.6 S(rtran:).15 E(subroutine defbasis\(id, mat\))216 333.6 Q(inte)216
345.6 Q(ger id)-.15 E(real mat\(4, 4\))216 357.6 Q(C:)180 381.6 Q
(defbasis\(id, mat\))216 393.6 Q 13.5(short id;)252 405.6 R 6.28
(Matrix mat;)252 417.6 R F1(polymode\(mode\))108 446.4 Q(NO)144 458.4 Q
.455(TE:- F)-.4 F .455(or this call to have any ef)-1.05 F(fect)-.18 E
F0 .454(it must ha)2.954 F .754 -.15(ve b)-.2 H(een).15 E F1 .454
(conditionally compilied)2.954 F F0 .454(into the library)2.954 F(.)-.65
E 2.483
(\(See polygons.c for details\) Control the \214lling of polygons. It e)
144 470.4 R 2.483(xpects one of the follo)-.15 F(wing)-.25 E 1.177
(PYM_LINE, which means only the edges of the polygon will be dra)144
482.4 R 1.176(wn and PYM_FILL which)-.15 F .906
(means \214ll the polygon \(the def)144 494.4 R .906
(ault\). PYM_POINT and PYM_HOLLO)-.1 F 3.406(Wa)-.35 G .906
(re also recognised b)-3.406 F(ut)-.2 E(the)144 506.4 Q 2.5(yd)-.15 G
(on')-2.5 E 2.5(tb)-.18 G(eha)-2.5 E .3 -.15(ve q)-.2 H(uite as the).15
E 2.5(yw)-.15 G(ould with SGI GL.)-2.6 E 3.109(Also note that in F)144
530.4 R 3.108
(ortran the corresponding constants are truncated to PYM_LI, PYM_FI,)
-.15 F(PYM_PO and PYM_HO respecti)144 542.4 Q(vly)-.25 E 2.5(.T)-.65 G
(hese appear in fv)-2.5 E(ogl.h.)-.2 E -.15(Fo)180 578.4 S(rtran:).15 E
(subroutine polymode\(mode\))216 590.4 Q(inte)216 602.4 Q(ger mode)-.15
E(C:)180 626.4 Q(polymode\(mode\))216 638.4 Q 15.72(long mode;)252 650.4
R/F2 10/Times-Bold@0 SF(The De)87 679.2 Q(vice Queue and V)-.15 E
(aluator Routines.)-.92 E F0(The a)108 691.2 Q -.25(va)-.2 G(ilable de)
.25 E(vices are de\214ned in the header \214les v)-.25 E(ode)-.2 E
(vice.h and for FOR)-.25 E(TRAN fv)-.6 E(ode)-.2 E(vice.h)-.25 E -.4(VO)
72 768 S(GL 1.2.8).4 E(12 Oct 1993)159.41 E(7)204.28 E EP
%%Page: 8 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 10/Times-Italic@0 SF(qde)108 84 Q(vice\(de)-.15 E(v\))-.15 E F0
(Enable a de)144 96 Q(vice. Note: in V)-.25 E
(OGL the queue is of length 1.)-.4 E -.15(Fo)180 120 S(rtran:).15 E
(subroutine qde)216 132 Q(vice\(de)-.25 E(v\))-.25 E(inte)216 144 Q
(ger de)-.15 E(v)-.25 E(C:)180 168 Q(qde)216 180 Q(vice\(de)-.25 E(v\))
-.25 E(De)252 192 Q 5.43(vice de)-.25 F(v;)-.25 E F1(unqde)108 220.8 Q
(vice\(de)-.15 E(v\))-.15 E F0(Disable a de)144 232.8 Q(vice.)-.25 E
-.15(Fo)180 256.8 S(rtran:).15 E(subroutine qde)216 268.8 Q(vice\(de)
-.25 E(v\))-.25 E(inte)216 280.8 Q(ger de)-.15 E(v)-.25 E(C:)180 304.8 Q
(qde)216 316.8 Q(vice\(de)-.25 E(v\))-.25 E(De)252 328.8 Q 5.43(vice de)
-.25 F(v;)-.25 E F1(qr)108 357.6 Q(ead\(data\))-.37 E F0 1.168
(Read an e)144 369.6 R -.15(ve)-.25 G 1.168(nt from the de).15 F 1.168
(vice queue. This routines blocks until something happens. Note: it is)
-.25 F(important to ha)144 381.6 Q .3 -.15(ve c)-.2 H(alled qde).15 E
(vice before doing this.)-.25 E -.15(Fo)180 405.6 S(rtran:).15 E(inte)
216 417.6 Q(ger function qread\(data\))-.15 E(inte)216 429.6 Q
(ger*2 data)-.15 E(C:)180 453.6 Q(long qread\(data\))216 465.6 Q 13.5
(short *data;)252 477.6 R F1(isqueued\(de)108 506.4 Q(v\))-.15 E F0
(Check to see if de)144 518.4 Q(vice de)-.25 E 2.5(vi)-.25 G 2.5(se)-2.5
G(nabled for queueing.)-2.5 E -.15(Fo)180 542.4 S(rtran:).15 E
(logical function isqueued\(de)216 554.4 Q(v\))-.25 E(inte)216 566.4 Q
(ger de)-.15 E(v)-.25 E(C:)180 590.4 Q(Boolean isqueued\(de)216 602.4 Q
(v\))-.25 E 13.5(short *de)252 614.4 R(v;)-.25 E F1(qtest\(\))108 643.2
Q F0(Check if there is an)10.45 E(ything in the queue. Note: in V)-.15 E
(OGL the queue is only 1 entry deep.)-.4 E -.15(Fo)180 667.2 S(rtran:)
.15 E(logical function qtest)216 679.2 Q(C:)180 703.2 Q
(Boolean qtest\(\))216 715.2 Q -.4(VO)72 768 S(GL 1.2.8).4 E
(12 Oct 1993)159.41 E(8)204.28 E EP
%%Page: 9 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 10/Times-Italic@0 SF(qr)108 84 Q(eset\(\))-.37 E F0
(Reset the de)5.27 E(vice queue. This will get rid of an)-.25 E 2.5(yp)
-.15 G(ending e)-2.5 E -.15(ve)-.25 G(nts.).15 E -.15(Fo)180 108 S
(rtran:).15 E(subroutine qreset)216 120 Q(C:)180 144 Q(qreset\(\))216
156 Q F1 -.1(ge)108 184.8 S(tb).1 E(utton\(de)-.2 E(v\))-.15 E F0
(Returns the up \(0\) or do)144 196.8 Q(wn \(1\) state of a b)-.25 E
(utton.)-.2 E -.15(Fo)180 220.8 S(rtran:).15 E(logical function getb)216
232.8 Q(utton\(de)-.2 E(v\))-.25 E(inte)216 244.8 Q(ger de)-.15 E(v)-.25
E(C:)180 268.8 Q(Boolean getb)216 280.8 Q(utton\(de)-.2 E(v\))-.25 E(De)
252 292.8 Q 5.43(vice de)-.25 F(v;)-.25 E F1 -.1(ge)108 321.6 S
(tvaluator\(de).1 E(v\))-.15 E F0 .269(Return the current v)144 333.6 R
.269(alue of the v)-.25 F(aluator)-.25 E 2.769(.C)-.55 G .268
(urrently the only v)-2.769 F .268(aluators supported are MOUSEX and)
-.25 F(MOUSEY)144 345.6 Q(.)-1.29 E -.15(Fo)180 369.6 S(rtran:).15 E
(inte)216 381.6 Q(ger function getv)-.15 E(aluator\(de)-.25 E(v\))-.25 E
(inte)216 393.6 Q(ger de)-.15 E(v)-.25 E(C:)180 417.6 Q(long getv)216
429.6 Q(aluator\(de)-.25 E(v\))-.25 E(De)252 441.6 Q 5.43(vice de)-.25 F
(v;)-.25 E/F2 10/Times-Bold@0 SF -.37(Vi)87 470.4 S(ewport Routines.).37
E F1(vie)108 482.4 Q(wport\(left, right, bottom, top\))-.15 E F0 1.614
(Specify which part of the screen to dra)144 494.4 R 4.115(wi)-.15 G
1.615(n. Left, right, bottom, and top are inte)-4.115 F 1.615(ger v)-.15
F 1.615(alues in)-.25 F(screen coordinates.)144 506.4 Q -.15(Fo)180
530.4 S(rtran:).15 E(subroutine vie)216 542.4 Q
(wport\(left, right, bottom, top\))-.25 E(inte)216 554.4 Q
(ger left, right, bottom, top)-.15 E(C:)180 578.4 Q(vie)216 590.4 Q
(wport\(left, right, bottom, top\))-.25 E 12.5(Screencoord left,)252
602.4 R(right, bottom, top;)2.5 E F1(pushvie)108 631.2 Q(wport\(\))-.15
E F0(Sa)144 643.2 Q .3 -.15(ve c)-.2 H(urrent vie).15 E
(wport on the vie)-.25 E(wport stack.)-.25 E -.15(Fo)180 667.2 S(rtran:)
.15 E(subroutine pushvie)216 679.2 Q(wport)-.25 E(C:)180 703.2 Q
(pushvie)216 715.2 Q(wport\(\))-.25 E -.4(VO)72 768 S(GL 1.2.8).4 E
(12 Oct 1993)159.41 E(9)204.28 E EP
%%Page: 10 10
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 10/Times-Italic@0 SF(popvie)108 84 Q(wport\(\))-.15 E F0
(Retrie)144 96 Q .3 -.15(ve l)-.25 H(ast pushed vie).15 E(wport.)-.25 E
-.15(Fo)180 120 S(rtran:).15 E(subroutine popvie)216 132 Q(wport)-.25 E
(C:)180 156 Q(popvie)216 168 Q(wport\(\))-.25 E F1 -.1(ge)108 196.8 S
(tvie).1 E(wport\(left, right, bottom, top\))-.15 E F0
(Returns the left, right, bottom and top limits of the current vie)144
208.8 Q(wport in screen coordinates.)-.25 E -.15(Fo)180 232.8 S(rtran:)
.15 E(subroutine getvie)216 244.8 Q(wport\(left, right, bottom, top\))
-.25 E(inte)216 256.8 Q(ger*2 left, right, bottom, top)-.15 E(C:)180
280.8 Q(getvie)216 292.8 Q(wport\(left, right, bottom, top\))-.25 E 12.5
(Screencoord *left,)252 304.8 R(*right, *bottom, *top;)2.5 E/F2 10
/Times-Bold@0 SF(Attrib)87 333.6 Q(ute Stack Routines.)-.2 E F0 .599
(The attrib)108 345.6 R .599
(ute stack contains details such as current color)-.2 F 3.099(,c)-.4 G
.599(urrent line style and width, and the current font)-3.099 F(number)
108 357.6 Q 3.916(.I)-.55 G 3.916(fy)-3.916 G 1.417(ou need to pre)
-3.916 F -.15(ve)-.25 G 1.417(nt object calls form changing these, use)
.15 F F1(pushattrib)3.917 E(utes)-.2 E F0 1.417(before the call and)
3.917 F F1(popattrib)108 369.6 Q(utes)-.2 E F0(after)2.5 E(.)-.55 E F1
(pushattrib)108 386.4 Q(utes\(\))-.2 E F0(Sa)144 398.4 Q .3 -.15(ve t)
-.2 H(he current attrib).15 E(utes on the attrib)-.2 E(ute stack.)-.2 E
-.15(Fo)180 422.4 S(rtran:).15 E(subroutine pushattrib)216 434.4 Q(utes)
-.2 E(C:)180 458.4 Q(pushattrib)216 470.4 Q(utes\(\))-.2 E F1(popattrib)
108 487.2 Q(utes\(\))-.2 E F0(Restore the attrib)144 499.2 Q
(utes to what the)-.2 E 2.5(yw)-.15 G(ere at the last)-2.5 E F1
(pushattrib)2.5 E(ute\(\).)-.2 E F0 -.15(Fo)180 523.2 S(rtran:).15 E
(subroutine popattrib)216 535.2 Q(utes)-.2 E(C:)180 559.2 Q(popattrib)
216 571.2 Q(utes\(\))-.2 E F2(Pr)87 600 Q(ojection Routines.)-.18 E F0
.817(All the projection routines de\214ne a ne)108 612 R 3.317(wt)-.25 G
.817(ransformation matrix, and consequently the w)-3.317 F .817
(orld units. P)-.1 F(arallel)-.15 E .636
(projections are de\214ned by ortho or ortho2. Perspecti)108 624 R .937
-.15(ve p)-.25 H .637(rojections can be de\214ned by perspecti).15 F
.937 -.15(ve a)-.25 H .637(nd win-).15 F(do)108 636 Q 3.8 -.65(w. N)-.25
H(ote the types Angle, etc, are de\214ned in v).65 E
(ogl.h. Remember angles are in tenths of de)-.2 E(grees.)-.15 E F1
(ortho\(left, right, bottom, top, near)108 652.8 Q 2.5(,f)-1.11 G(ar\))
-2.5 E F0 .737
(De\214ne x \(left, right\), y \(bottom, top\), and z \(near)144 664.8 R
3.236(,f)-.4 G .736(ar\) clipping planes. The near and f)-3.336 F .736
(ar clipping)-.1 F .546(planes are actually speci\214ed as distances al\
ong the line of sight. These distances can also be ne)144 676.8 R(g-)
-.15 E(ati)144 688.8 Q -.15(ve)-.25 G 5(.T).15 G
(he actual location of the clipping planes is z = -near_d and z = -f)-5
E(ar_d.)-.1 E -.15(Fo)180 712.8 S(rtran:).15 E
(subroutine ortho\(left, right, bottom, top, near_d, f)216 724.8 Q
(ar_d\))-.1 E -.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)159.41 E(10)
199.28 E EP
%%Page: 11 11
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E(real left, right, bottom, top, near_d, f)216 84 Q(ar_d)-.1 E(C:)
180 108 Q(ortho\(left, right, bottom, top, near_d, f)216 120 Q(ar_d\))
-.1 E 8.5(Coord left,)252 132 R(right, bottom, top, near_d, f)2.5 E
(ar_d;)-.1 E/F1 10/Times-Italic@0 SF(ortho2\(left, right, bottom, top\))
108 160.8 Q F0
(De\214ne x \(left, right\), and y \(bottom, top\) clipping planes.)144
172.8 Q -.15(Fo)180 196.8 S(rtran:).15 E
(subroutine ortho2\(left, right, bottom, top\))216 208.8 Q
(real left, right, bottom, top)216 220.8 Q(C:)180 244.8 Q
(ortho2\(left, right, bottom, top\))216 256.8 Q 15.72(\215oat left,)252
268.8 R(right, bottom, top;)2.5 E F1(per)108 297.6 Q(spective\(fo)-.1 E
1.48 -.74(v, a)-.1 H(spect, near).74 E 2.5(,f)-1.11 G(ar\))-2.5 E F0 .39
(Specify a perspecti)144 309.6 R .69 -.15(ve v)-.25 H(ie).15 E .39
(wing p)-.25 F .39(yramid in w)-.1 F .389(orld coordinates by gi)-.1 F
.389(ving a \214eld of vie)-.25 F 1.689 -.65(w, a)-.25 H .389
(spect ratio).65 F(and the distance from the e)144 321.6 Q
(ye of the near and f)-.15 E(ar clipping plane.)-.1 E 1.605(The fo)144
345.6 R 2.905 -.65(v, s)-.15 H 1.605(peci\214es the \214eld of vie).65 F
4.105(wi)-.25 G 4.105(nt)-4.105 G 1.606
(he y direction. It is the range of the area that is being)-4.105 F(vie)
144 357.6 Q .126(wed. The aspect ratio is the ratio x/y \(width/height\
\) which determines the fo)-.25 F 2.625(vi)-.15 G 2.625(nt)-2.625 G .125
(he x direction.)-2.625 F -.15(Fo)180 393.6 S(rtran:).15 E
(subroutine perspecti)216 405.6 Q -.15(ve)-.25 G(\(fo).15 E 1.3 -.65
(v, a)-.15 H(spect, near).65 E 2.5(,f)-.4 G(ar\))-2.6 E(inte)216 417.6 Q
(ger fo)-.15 E(v)-.15 E(real aspect, near)216 429.6 Q 2.5(,f)-.4 G(ar)
-2.6 E(C:)180 453.6 Q(perspecti)216 465.6 Q -.15(ve)-.25 G(\(fo).15 E
1.3 -.65(v, a)-.15 H(spect, near).65 E 2.5(,f)-.4 G(ar\))-2.6 E 9.06
(Angle fo)252 477.6 R(v;)-.15 E 15.72(\215oat aspect;)252 489.6 R 8.5
(Coord near)252 501.6 R 2.5(,f)-.4 G(ar;)-2.6 E F1
(window\(left, right, bot, top, near)108 530.4 Q 2.5(,f)-1.11 G(ar\))
-2.5 E F0(Specify a perspecti)144 542.4 Q .3 -.15(ve v)-.25 H(ie).15 E
(wing p)-.25 E(yramid in w)-.1 E(orld coordinates by)-.1 E(gi)144 554.4
Q(ving the rectangle closest to the e)-.25 E
(ye \(ie. at the near clipping)-.15 E
(plane\) and the distances to the near and f)144 566.4 Q
(ar clipping planes.)-.1 E -.15(Fo)180 590.4 S(rtran:).15 E
(subroutine windo)216 602.4 Q(w\(left, right, bot, top, near)-.25 E 2.5
(,f)-.4 G(ar\))-2.6 E(real left, right, bot, top, near)216 614.4 Q 2.5
(,f)-.4 G(ar)-2.6 E(C:)180 638.4 Q(windo)216 650.4 Q
(w\(left, right, bot, top, near)-.25 E 2.5(,f)-.4 G(ar\))-2.6 E 10
(\215oat left,)252 662.4 R(right, bot, top, near)2.5 E 2.5(,f)-.4 G(ar;)
-2.6 E/F2 10/Times-Bold@0 SF(Matrix Stack Routines.)87 691.2 Q F1
(pushmatrix\(\))108 703.2 Q F0(Sa)144 715.2 Q .3 -.15(ve t)-.2 H
(he current transformation matrix on the matrix stack.).15 E -.4(VO)72
768 S(GL 1.2.8).4 E(12 Oct 1993)159.41 E(11)199.28 E EP
%%Page: 12 12
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E -.15(Fo)180 84 S(rtran:).15 E(subroutine pushmatrix)216 96 Q(C:)
180 120 Q(pushmatrix\(\))216 132 Q/F1 10/Times-Italic@0 SF
(popmatrix\(\))108 160.8 Q F0(Retrie)144 172.8 Q .3 -.15(ve t)-.25 H
(he last matrix pushed and mak).15 E 2.5(ei)-.1 G 2.5(tt)-2.5 G
(he current transformation matrix.)-2.5 E -.15(Fo)180 196.8 S(rtran:).15
E(subroutine popmatrix)216 208.8 Q(C:)180 232.8 Q(popmatrix\(\))216
244.8 Q/F2 10/Times-Bold@0 SF -.37(Vi)87 273.6 S(ewpoint Routines.).37 E
F0 -.6(Vi)108 285.6 S -.25(ew).6 G
(point routines alter the current tranformation matrix.).25 E F1
(polarvie)108 302.4 Q(w\(dist, azim, inc, twist\))-.15 E F0 .248
(Specify the vie)144 314.4 R(wer')-.25 E 2.748(sp)-.55 G .249
(osition in polar coordinates by gi)-2.748 F .249
(ving the distance from the vie)-.25 F .249(wpoint to the)-.25 F -.1(wo)
144 326.4 S .597(rld origin, the azimuthal angle in the x-y plane, meas\
ured from the y-axis, the incidence angle).1 F(in the y-z plane, measur\
ed from the z-axis, and the twist angle about the line of sight.)144
338.4 Q -.15(Fo)180 362.4 S(rtran:).15 E(subroutine polarvie)216 374.4 Q
(w\(dist, azim, inc, twist\))-.25 E(real dist)216 386.4 Q(inte)216 398.4
Q(ger azim, inc, twist)-.15 E(C:)180 422.4 Q(polarvie)216 434.4 Q
(w\(dist, azim, inc, twist\))-.25 E 8.5(Coord dist;)252 446.4 R 9.06
(Angle azim,)252 458.4 R(inc, twist;)2.5 E F1(lookat\(vx, vy)108 487.2 Q
2.5(,v)-.55 G(z, px, py)-2.5 E 2.5(,p)-.55 G(z, twist\))-2.5 E F0 .46
(Specify the vie)144 499.2 R(wer')-.25 E 2.96(sp)-.55 G .46
(osition by gi)-2.96 F .461(ving a vie)-.25 F .461
(wpoint and a reference point in w)-.25 F .461(orld coordinates. A)-.1 F
(twist about the line of sight may also be gi)144 511.2 Q -.15(ve)-.25 G
(n.).15 E .05(The vie)144 535.2 R .05(wpoint is at \(vx, vy)-.25 F 2.55
(,v)-.65 G .05(z\). The reference \(or vie)-2.55 F .049
(wed\) point is at \(px, p)-.25 F 1.349 -.65(y, p)-.1 H .049
(z\). ie the line of site).65 F(is from v to p. The twist parameter is \
a righthand rotation about the line of site.)144 547.2 Q -.15(Fo)180
583.2 S(rtran:).15 E(subroutine lookat\(vx, vy)216 595.2 Q 2.5(,v)-.65 G
(z, px, p)-2.5 E 1.3 -.65(y, p)-.1 H(z, twist\)).65 E(real vx, vy)216
607.2 Q 2.5(,v)-.65 G(z, px, p)-2.5 E 1.3 -.65(y, p)-.1 H(z).65 E(inte)
216 619.2 Q(ger twist)-.15 E(C:)180 643.2 Q(lookat\(vx, vy)216 655.2 Q
2.5(,v)-.65 G(z, px, p)-2.5 E 1.3 -.65(y, p)-.1 H(z, twist\)).65 E 15.72
(\215oat vx,)252 667.2 R(vy)2.5 E 2.5(,v)-.65 G(z, px, p)-2.5 E 1.3 -.65
(y, p)-.1 H(z;).65 E 9.06(Angle twist;)252 679.2 R -.4(VO)72 768 S
(GL 1.2.8).4 E(12 Oct 1993)159.41 E(12)199.28 E EP
%%Page: 13 13
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 10/Times-Bold@0 SF(Mo)87 84 Q .2 -.1(ve R)-.1 H(outines.).1 E
F0 .458(There are v)108 96 R .458
(ariations on all these routines that end in ')-.25 F .458
(s' and also end in 'i'. In the case of the ')-.55 F .459(s' v)-.55 F
(ariations)-.25 E(the)108 108 Q 2.955(yt)-.15 G(ak)-2.955 E 2.955(ea)-.1
G -.18(rg)-2.955 G .455(uments of type Scoord in C and inte).18 F .455
(ger*2 in FOR)-.15 F .454(TRAN. In the case of the 'i' v)-.6 F .454
(ariations the)-.25 F(y)-.15 E(tak)108 120 Q 2.5(ea)-.1 G -.18(rg)-2.5 G
(uments of type Icoord in C and inte).18 E(ger in FOR)-.15 E(TRAN.)-.6 E
/F2 10/Times-Italic@0 SF(mo)108 136.8 Q(ve\(x, y)-.1 E 2.5(,z)-.55 G(\))
-2.5 E F0(Mo)144 148.8 Q .3 -.15(ve c)-.15 H
(urrent graphics position to \(x, y).15 E 2.5(,z)-.65 G(\). \(x, y)-2.5
E 2.5(,z)-.65 G 2.5(\)i)-2.5 G 2.5(sap)-2.5 G(oint in w)-2.5 E
(orld coordinates.)-.1 E -.15(Fo)180 172.8 S(rtran:).15 E(subroutine mo)
216 184.8 Q -.15(ve)-.15 G(\(x, y).15 E 2.5(,z)-.65 G(\))-2.5 E
(real x, y)216 196.8 Q 2.5(,z)-.65 G(C:)180 220.8 Q(mo)216 232.8 Q -.15
(ve)-.15 G(\(x, y).15 E 2.5(,z)-.65 G(\))-2.5 E 8.5(Coord x,)252 244.8 R
1.3 -.65(y, z)2.5 H(;).65 E F2(rmv\(deltax, deltay)108 273.6 Q 2.5(,d)
-.55 G(eltaz\))-2.5 E F0(Relati)144 285.6 Q .3 -.15(ve m)-.25 H -.15
(ove).15 G 2.5(.d).15 G(eltax, deltay)-2.5 E 2.5(,a)-.65 G
(nd deltaz are of)-2.5 E(fsets in w)-.25 E(orld units.)-.1 E -.15(Fo)180
309.6 S(rtran:).15 E(subroutine rmv\(deltax, deltay)216 321.6 Q 2.5(,d)
-.65 G(eltaz\))-2.5 E(real deltax, deltay)216 333.6 Q 2.5(,d)-.65 G
(eltaz)-2.5 E(C:)180 357.6 Q(rmv\(deltax, deltay)216 369.6 Q 2.5(,d)-.65
G(eltaz\))-2.5 E 5(Coord deltax,)252 381.6 R(deltay)2.5 E 2.5(,d)-.65 G
(eltaz;)-2.5 E F2(mo)108 410.4 Q(ve2\(x, y\))-.1 E F0(Mo)144 422.4 Q .3
-.15(ve g)-.15 H
(raphics position to point \(x, y\). \(x, y\) is a point in w).15 E
(orld coordinates.)-.1 E -.15(Fo)180 446.4 S(rtran:).15 E(subroutine mo)
216 458.4 Q -.15(ve)-.15 G(2\(x, y\)).15 E(real x, y)216 470.4 Q(C:)180
494.4 Q(mo)216 506.4 Q -.15(ve)-.15 G(2\(x, y\)).15 E 8.5(Coord x,)252
518.4 R(y;)2.5 E F2(rmv2\(deltax, deltay\))108 547.2 Q F0(Relati)144
559.2 Q .3 -.15(ve m)-.25 H -.15(ove).15 G(2. deltax and deltay are of)
.15 E(fsets in w)-.25 E(orld units.)-.1 E -.15(Fo)180 583.2 S(rtran:).15
E(subroutine rmv2\(deltax, deltay\))216 595.2 Q(real deltax, deltay)216
607.2 Q(C:)180 631.2 Q(rmv2\(deltax, deltay\))216 643.2 Q 8.5
(Coord deltax,)252 655.2 R(deltay;)2.5 E F1(Line r)87 696 Q(outines.)
-.18 E F0 2.5(These routines)108 708 R
(set the line style and line width if the current de)2.5 E
(vice is capable of doing so.)-.25 E -.4(VO)72 768 S(GL 1.2.8).4 E
(12 Oct 1993)159.41 E(13)199.28 E EP
%%Page: 14 14
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 10/Times-Italic@0 SF(de\215inestyle\(n, style\))108 84 Q F0
(De\214ne a line style and binds it to the inte)144 96 Q(ger n. The)-.15
E(line style is a bit pattern of 16 bits width.)5 E -.15(Fo)180 108 S
(rtran:).15 E(subroutine de\215in\(n, style\))216 120 Q(inte)216 132 Q
5.88(ger n)-.15 F(inte)216 144 Q(ger style)-.15 E(C:)180 168 Q
(de\215inestyle\(n, style\))216 180 Q 13.5(short n;)252 192 R 32.28
(Linestyle style;)252 204 R F1(setlinestyle\(n\))108 244.8 Q F0
(Sets the current line style.)144 256.8 Q -.15(Fo)180 268.8 S(rtran:).15
E(subroutine setlin\(n\))216 280.8 Q(inte)216 292.8 Q 5.88(ger n)-.15 F
(C:)180 316.8 Q(setlinestyle\(n\))216 328.8 Q 13.5(short n;)252 340.8 R
F1(line)108 381.6 Q(width\(n\))-.15 E F0
(Sets the current line width to 'n' pix)144 393.6 Q(els wide.)-.15 E
-.15(Fo)180 405.6 S(rtran:).15 E(subroutine line)216 417.6 Q(wi\(n\))
-.25 E(inte)216 429.6 Q 5.88(ger n)-.15 F(C:)180 453.6 Q(line)216 465.6
Q(width\(n\))-.25 E 13.5(short n;)252 477.6 R/F2 10/Times-Bold@0 SF
(Drawing Routines.)87 530.4 Q F0 .458(There are v)108 542.4 R .458
(ariations on all these routines that end in ')-.25 F .458
(s' and also end in 'i'. In the case of the ')-.55 F .459(s' v)-.55 F
(ariations)-.25 E(the)108 554.4 Q 2.955(yt)-.15 G(ak)-2.955 E 2.955(ea)
-.1 G -.18(rg)-2.955 G .455(uments of type Scoord in C and inte).18 F
.455(ger*2 in FOR)-.15 F .454(TRAN. In the case of the 'i' v)-.6 F .454
(ariations the)-.25 F(y)-.15 E(tak)108 566.4 Q 2.5(ea)-.1 G -.18(rg)-2.5
G(uments of type Icoord in C and inte).18 E(ger in FOR)-.15 E(TRAN.)-.6
E F1(dr)108 583.2 Q(aw\(x, y)-.15 E 2.5(,z)-.55 G(\))-2.5 E F0(Dra)144
595.2 Q 2.5(wf)-.15 G(rom current graphics position to \(x, y)-2.5 E 2.5
(,z)-.65 G(\). \(x, y)-2.5 E 2.5(,z)-.65 G 2.5(\)i)-2.5 G 2.5(sap)-2.5 G
(oint in w)-2.5 E(orld coordinates.)-.1 E -.15(Fo)180 619.2 S(rtran:).15
E(subroutine dra)216 631.2 Q(w\(x, y)-.15 E 2.5(,z)-.65 G(\))-2.5 E
(real x, y)216 643.2 Q 2.5(,z)-.65 G(C:)180 667.2 Q(dra)216 679.2 Q
(w\(x, y)-.15 E 2.5(,z)-.65 G(\))-2.5 E 8.5(Coord x,)252 691.2 R 1.3
-.65(y, z)2.5 H(;).65 E -.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)159.41
E(14)199.28 E EP
%%Page: 15 15
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 10/Times-Italic@0 SF -.37(rd)108 84 S(r\(deltax, deltay).37 E
2.5(,d)-.55 G(eltaz\))-2.5 E F0(Relati)144 96 Q .3 -.15(ve d)-.25 H(ra)
.15 E 1.3 -.65(w. d)-.15 H(eltax, deltay).65 E 2.5(,a)-.65 G
(nd deltaz are of)-2.5 E(fsets in w)-.25 E(orld units.)-.1 E -.15(Fo)180
120 S(rtran:).15 E(subroutine rdr\(deltax, deltay)216 132 Q 2.5(,d)-.65
G(eltaz\))-2.5 E(real deltax, deltay)216 144 Q 2.5(,d)-.65 G(eltaz)-2.5
E(C:)180 168 Q(rdr\(deltax, deltay)216 180 Q 2.5(,d)-.65 G(eltaz\))-2.5
E 5(Coord deltax,)252 192 R(deltay)2.5 E 2.5(,d)-.65 G(eltaz;)-2.5 E F1
(dr)108 220.8 Q(aw2\(x, y\))-.15 E F0(Dra)144 232.8 Q 2.5(wf)-.15 G(rom\
 current graphics position to point \(x, y\). \(x, y\) is a point in w)
-2.5 E(orld coordinates.)-.1 E -.15(Fo)180 256.8 S(rtran:).15 E
(subroutine dra)216 268.8 Q(w2\(x, y\))-.15 E(real x, y)216 280.8 Q(C:)
180 304.8 Q(dra)216 316.8 Q(w2\(x, y\))-.15 E 8.5(Coord x,)252 328.8 R
(y;)2.5 E F1 -.37(rd)108 357.6 S(r2\(deltax, deltay\)).37 E F0(Relati)
144 369.6 Q .3 -.15(ve d)-.25 H(ra).15 E(w2. deltax and deltay are of)
-.15 E(fsets in w)-.25 E(orld units.)-.1 E -.15(Fo)180 393.6 S(rtran:)
.15 E(subroutine rdr2\(deltax, deltay\))216 405.6 Q(real deltax, deltay)
216 417.6 Q(C:)180 441.6 Q(rdr2\(deltax, deltay\))216 453.6 Q 5
(Coord deltax,)252 465.6 R(deltay;)2.5 E/F2 10/Times-Bold@0 SF -1(Ve)87
506.4 S(rtex calls.)1 E F0 .122(There are calls which we term ')108
518.4 R -.15(ve)-.5 G(rte).15 E 2.622(xc)-.15 G .122
(alls' which simply specify a point in 4D, 3D or 2D. These calls tak)
-2.622 F(e)-.1 E(an array which speci\214es the coordinates of the poin\
t. The interpretation of these points is described belo)108 530.4 Q -.65
(w.)-.25 G F1(v4d\(v\))108 554.4 Q F0(Specify a v)2.5 E(erte)-.15 E
(x\(point\) in 4D using double precision numbers.)-.15 E -.15(Fo)144
578.4 S(rtran:).15 E(subroutine v4d\(v\))180 590.4 Q(real *8 v\(4\))180
602.4 Q(C:)144 626.4 Q(v4d\(v\))180 638.4 Q(double v[4];)216 650.4 Q F1
(v4f\(v\))108 686.4 Q F0(Specify a v)2.5 E(erte)-.15 E
(x\(point\) in 4D using single precision \215oating point numbers.)-.15
E -.15(Fo)144 710.4 S(rtran:).15 E(subroutine v4f\(v\))180 722.4 Q -.4
(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)159.41 E(15)199.28 E EP
%%Page: 16 16
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E(real v\(4\))180 84 Q(C:)144 108 Q(v4f\(v\))180 120 Q
(\215oat v[4];)216 132 Q/F1 10/Times-Italic@0 SF(v4i\(v\))108 168 Q F0
(Specify a v)2.5 E(erte)-.15 E(x\(point\) in 4D using inte)-.15 E
(ger numbers)-.15 E -.15(Fo)144 192 S(rtran:).15 E(subroutine v4i\(v\))
180 204 Q(inte)180 216 Q(ger v\(4\))-.15 E(C:)144 240 Q(v4i\(v\))180 252
Q(long v[4];)216 264 Q F1(v4s\(v\))108 300 Q F0(Specify a v)2.5 E(erte)
-.15 E(x\(point\) in 4D using short inte)-.15 E(ger numbers)-.15 E -.15
(Fo)144 324 S(rtran:).15 E(subroutine v4s\(v\))180 336 Q(inte)180 348 Q
(ger *2)-.15 E(v\(4\))5 E(C:)144 372 Q(v4s\(v\))180 384 Q(short v[4];)
216 396 Q .925(There are also equi)108 448.8 R -.25(va)-.25 G .924(lent\
 calls for 3D points \(v3d, v3f, v3i, v3s\) and 2D points \(v2d, v2f, v\
2i, v2s\). The).25 F .226(only dif)108 460.8 R .226
(ference is the number of elements that each v)-.25 F(erte)-.15 E 2.726
(xn)-.15 G .227(eeds to be speci\214ed. It should also be noted the)
-2.726 F .094(the dif)108 472.8 R .094(ferent data types \(ie. double, \
\215oat, long and short\) are merely dif)-.25 F .093(ferent w)-.25 F
.093(ays of representing the same)-.1 F .848(basic coordinate data \(ca\
lling v3s with v[] = {100,200,200} is the same as calling v3f with v[] \
= {100.0,)108 484.8 R(200.0, 200.0}\).)108 496.8 Q .758(The w)108 520.8
R .757(ay these points are interpreted depends on what mode has be set \
up with one of the calls)-.1 F F1(bgnpoint,)3.257 E(bgnline)108 532.8 Q
3.488(,b)-.1 G .988(gnclosedline or bgnpolygon.)-3.488 F F0(The)5.988 E
F1(bgnpoint)3.488 E F0 .989(call speci\214es that the ne)3.489 F .989
(xt series of v)-.15 F(erte)-.15 E 3.489(xc)-.15 G .989(alls are)-3.489
F(specifying a chain of points \(dots\) to be dra)108 544.8 Q(wn. A)-.15
E F1(bgnpoint)2.5 E F0(is terminated with a)2.5 E F1(endpoint)2.5 E F0
(call.)2.5 E -.15(Fo)144 568.8 S(rtran:).15 E(subroutine bgnpoint)180
580.8 Q(C:)144 604.8 Q(bgnpoint\(\))180 616.8 Q -.15(Fo)144 640.8 S
(rtran:).15 E(subroutine endpoint)180 652.8 Q(C:)144 676.8 Q
(endpoint\(\))180 688.8 Q -.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)
159.41 E(16)199.28 E EP
%%Page: 17 17
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E(The)108 84 Q/F1 10/Times-Italic@0 SF(bgnline)2.808 E F0 .308
(call speci\214es that the ne)2.808 F .308(xt series of v)-.15 F(erte)
-.15 E 2.808(xc)-.15 G .308
(alls are specifying the points on a polyline. A)-2.808 F F1(bgn-)2.807
E(line)108 96 Q F0(is terminated with a)110.5 108 Q F1(endline)2.5 E F0
(call.)2.5 E -.15(Fo)144 132 S(rtran:).15 E(subroutine bgnline)180 144 Q
(C:)144 168 Q(bgnline\(\))180 180 Q -.15(Fo)144 204 S(rtran:).15 E
(subroutine endline)180 216 Q(C:)144 240 Q(endline\(\))180 252 Q(The)108
300 Q F1(bgnclosedline)2.57 E F0 .07(call is similar to the)2.57 F F1
(bgnline)2.57 E F0 -.15(ex)2.571 G .071(cept that when).15 F F1
(endclosedline)2.571 E F0 .071(is called the \214rst point gi)2.571 F
-.15(ve)-.25 G(n).15 E .131(\(ie. the one \214rst after the bgnclosedli\
ne call\) is joined to the last point gi)108 312 R -.15(ve)-.25 G 2.63
(n\().15 G .13(ie. the one just before the end-)-2.63 F
(closedline call\).)108 324 Q -.15(Fo)144 348 S(rtran:).15 E
(subroutine bgncloseline)180 360 Q(C:)144 384 Q(bgnclosedline\(\))180
396 Q -.15(Fo)144 420 S(rtran:).15 E(subroutine endclosedline)180 432 Q
(C:)144 456 Q(endclosedline\(\))180 468 Q(The)108 516 Q F1(bgnpolygon)
2.761 E F0 .262(call speci\214es that the ne)2.761 F .262
(xt series of v)-.15 F(erte)-.15 E 2.762(xc)-.15 G .262
(alls are de\214ning a polygon.)-2.762 F(When)5.262 E F1(endpolygon)
2.762 E F0 .513(is called, the polygon is closed and \214lled \(or dra)
108 528 R .513(wn as an outline depending on the mode that has been set)
-.15 F(with the)108 540 Q F1(polymode)2.5 E F0
(call if this call has been compilied into the library)2.5 E(.)-.65 E
-.15(Fo)144 576 S(rtran:).15 E(subroutine bgnpolygon)180 588 Q(C:)144
612 Q(bgnpolygon\(\))180 624 Q -.15(Fo)144 648 S(rtran:).15 E
(subroutine endpolygon)180 660 Q(C:)144 684 Q(endpolygon\(\))180 696 Q
-.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)159.41 E(17)199.28 E EP
%%Page: 18 18
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 10/Times-Bold@0 SF(Ar)87 84 Q(cs and Cir)-.18 E(cles.)-.18 E F0
.458(There are v)108 96 R .458
(ariations on all these routines that end in ')-.25 F .458
(s' and also end in 'i'. In the case of the ')-.55 F .459(s' v)-.55 F
(ariations)-.25 E(the)108 108 Q 2.955(yt)-.15 G(ak)-2.955 E 2.955(ea)-.1
G -.18(rg)-2.955 G .455(uments of type Scoord in C and inte).18 F .455
(ger*2 in FOR)-.15 F .454(TRAN. In the case of the 'i' v)-.6 F .454
(ariations the)-.25 F(y)-.15 E(tak)108 120 Q 2.5(ea)-.1 G -.18(rg)-2.5 G
(uments of type Icoord in C and inte).18 E(ger in FOR)-.15 E(TRAN.)-.6 E
/F2 10/Times-Italic@0 SF(cir)108 136.8 Q(clepr)-.37 E(ecision\(nse)-.37
E(gs\))-.4 E F0 .723(Set the number of line se)144 148.8 R .723
(gments making up a circle. Def)-.15 F .724
(ault is currently 32. The number of se)-.1 F(g-)-.15 E .464
(ments in an arc is calculated from nse)144 160.8 R .463
(gs according the span of the arc.)-.15 F .463(This routine is only a)
5.463 F -.25(va)-.2 G(il-).25 E(able in V)144 172.8 Q(OGL.)-.4 E -.15
(Fo)180 184.8 S(rtran:).15 E(subroutine circleprecision\(nse)216 196.8 Q
(gs\))-.15 E(inte)216 208.8 Q 5.88(ger nse)-.15 F(gs)-.15 E(C:)180 220.8
Q(circleprecision\(nse)216 232.8 Q(gs\))-.15 E 22.94(int nse)252 244.8 R
(gs;)-.15 E F2(ar)108 273.6 Q(c\(x, y)-.37 E 2.5(,r)-.55 G
(adius, startang)-2.65 E 2.5(,e)-.1 G(ndang\))-2.5 E F0(Dra)144 285.6 Q
2.5(wa)-.15 G 2.5(na)-2.5 G(rc. x, y)-2.5 E 2.5(,a)-.65 G
(nd radius are v)-2.5 E(alues in w)-.25 E(orld units.)-.1 E -.15(Fo)180
309.6 S(rtran:).15 E(subroutine arc\(x, y)216 321.6 Q 2.5(,r)-.65 G
(adius, startang, endang\))-2.5 E(real x, y)216 333.6 Q 2.5(,r)-.65 G
(adius;)-2.5 E(inte)216 345.6 Q(ger startang, endang;)-.15 E(C:)180
357.6 Q(arc\(x, y)216 369.6 Q 2.5(,r)-.65 G(adius, startang, endang\))
-2.5 E 2.5(Coord x,)252 381.6 R 1.3 -.65(y, r)2.5 H(adius;).65 E 2.5
(Angle startang,)252 393.6 R(endang;)2.5 E F2(ar)108 422.4 Q(cf\(x, y)
-.37 E 2.5(,r)-.55 G(adius, startang)-2.65 E 2.5(,e)-.1 G(ndang\))-2.5 E
F0(Dra)144 434.4 Q 4.164(wa\214)-.15 G 1.664(lled arc. x, y)-4.164 F
4.164(,a)-.65 G 1.664(nd radius are v)-4.164 F 1.664(alues in w)-.25 F
1.664(orld units. \(Ho)-.1 F 4.164(wt)-.25 G 1.665
(he \214lling is done may be)-4.164 F(changed by calling)144 446.4 Q F2
(polymode)2.5 E F0 2.5(,i)2.5 G 2.5(ft)-2.5 G
(his call has been compilied into the library\).)-2.5 E -.15(Fo)180
470.4 S(rtran:).15 E(subroutine arcf\(x, y)216 482.4 Q 2.5(,r)-.65 G
(adius, startang, endang\))-2.5 E(real x, y)216 494.4 Q 2.5(,r)-.65 G
(adius;)-2.5 E(inte)216 506.4 Q(ger startang, endang;)-.15 E(C:)180
518.4 Q(arcf\(x, y)216 530.4 Q 2.5(,r)-.65 G(adius, startang, endang\))
-2.5 E 2.5(Coord x,)252 542.4 R 1.3 -.65(y, r)2.5 H(adius;).65 E 2.5
(Angle startang,)252 554.4 R(endang;)2.5 E F2(cir)108 583.2 Q(c\(x, y)
-.37 E 2.5(,r)-.55 G(adius\))-2.65 E F0(Dra)144 595.2 Q 2.5(wac)-.15 G
(ircle. x, y)-2.5 E 2.5(,a)-.65 G(nd radius are v)-2.5 E(alues in w)-.25
E(orld units.)-.1 E -.15(Fo)180 619.2 S(rtran:).15 E
(subroutine circ\(x, y)216 631.2 Q 2.5(,r)-.65 G(adius\))-2.5 E 18.51
(real x,)216 643.2 R 1.3 -.65(y, r)2.5 H(adius).65 E(C:)180 655.2 Q
(circ\(x, y)216 667.2 Q 2.5(,r)-.65 G(adius\))-2.5 E 8.5(Coord x,)252
679.2 R 1.3 -.65(y, r)2.5 H(adius;).65 E -.4(VO)72 768 S(GL 1.2.8).4 E
(12 Oct 1993)159.41 E(18)199.28 E EP
%%Page: 19 19
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 10/Times-Italic@0 SF(cir)108 84 Q(cf\(x, y)-.37 E 2.5(,r)-.55 G
(adius\))-2.65 E F0(Dra)144 96 Q 3.682(wa\214)-.15 G 1.182
(lled circle. x, y)-3.682 F 3.682(,a)-.65 G 1.182(nd radius are v)-3.682
F 1.182(alues in w)-.25 F 1.181(orld units.)-.1 F(Ho)6.181 E 3.681(wt)
-.25 G 1.181(he \214lling is done may be)-3.681 F(changed by calling)144
108 Q F1(polymode)2.5 E(.)-.15 E F0 -.15(Fo)180 132 S(rtran:).15 E
(subroutine circf\(x, y)216 144 Q 2.5(,r)-.65 G(adius\))-2.5 E 18.51
(real x,)216 156 R 1.3 -.65(y, r)2.5 H(adius).65 E(C:)180 168 Q
(circf\(x, y)216 180 Q 2.5(,r)-.65 G(adius\))-2.5 E 8.5(Coord x,)252 192
R 1.3 -.65(y, r)2.5 H(adius;).65 E/F2 10/Times-Bold@0 SF(Cur)87 220.8 Q
.2 -.1(ve R)-.1 H(outines.).1 E F1(curvebasis\(id\))108 232.8 Q F0 1.306
(Set the basis matrix for a curv)144 244.8 R 3.807(et)-.15 G 3.807(ot)
-3.807 G 1.307(he matrix referenced by id.)-3.807 F 1.307
(The matrix and it')6.307 F 3.807(si)-.55 G 3.807(da)-3.807 G 1.307
(re tied)-3.807 F(together with a call to)144 256.8 Q F1(defbasis.)2.5 E
F0 -.15(Fo)180 280.8 S(rtran:).15 E(subroutine curv)216 292.8 Q
(ebasis\(id\))-.15 E(inte)216 304.8 Q(ger id)-.15 E(C:)180 316.8 Q(curv)
216 328.8 Q(ebasis\(id\))-.15 E 13.5(short id;)252 340.8 R F1(curvepr)
108 369.6 Q(ecision\(nse)-.37 E(gs\))-.4 E F0
(De\214ne the number of line se)144 381.6 Q(gments used to dra)-.15 E
2.5(wac)-.15 G(urv)-2.5 E(e.)-.15 E -.15(Fo)180 405.6 S(rtran:).15 E
(subroutine curv)216 417.6 Q(eprecision\(nse)-.15 E(gs\))-.15 E(inte)216
429.6 Q(ger nse)-.15 E(gs)-.15 E(C:)180 453.6 Q(curv)216 465.6 Q
(eprecision\(nse)-.15 E(gs\))-.15 E 13.5(short nse)252 477.6 R(gs;)-.15
E F1 -.37(rc)108 506.4 S(rv\(g).37 E(eom\))-.1 E F0(Dra)144 518.4 Q 2.5
(war)-.15 G(ational curv)-2.5 E(e.)-.15 E -.15(Fo)180 542.4 S(rtran:).15
E(subroutine rcrv\(geom\))216 554.4 Q(real geom\(4,4\))216 566.4 Q(C:)
180 578.4 Q(rcrv\(geom\))216 590.4 Q 8.5(Coord geom[4][4];)252 602.4 R
F1 -.37(rc)108 631.2 S(rvn\(n, g).37 E(eom\))-.1 E F0(Dra)144 643.2 Q
2.5(wn-3r)-.15 G(ational curv)-2.5 E 2.5(es)-.15 G -.15(eg)-2.5 G
(ments. Note: n must be at least 4.).15 E -.15(Fo)180 667.2 S(rtran:).15
E(subroutine rcrvn\(n, geom\))216 679.2 Q(inte)216 691.2 Q(ger n)-.15 E
(real geom\(4,n\))216 703.2 Q(C:)180 715.2 Q(rcrvn\(n, geom\))216 727.2
Q -.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)159.41 E(19)199.28 E EP
%%Page: 20 20
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E 15.72(long n;)252 84 R 8.5(Coord geom[][4];)252 96 R/F1 10
/Times-Italic@0 SF(crv\(g)108 124.8 Q(eom\))-.1 E F0(Dra)144 136.8 Q 2.5
(wac)-.15 G(urv)-2.5 E(e.)-.15 E -.15(Fo)180 160.8 S(rtran:).15 E
(subroutine crv\(geom\))216 172.8 Q(real geom\(3,4\))216 184.8 Q(C:)180
196.8 Q(crv\(geom\))216 208.8 Q 8.5(Coord geom[4][3];)252 220.8 R F1
(crvn\(n, g)108 249.6 Q(eom\))-.1 E F0(Dra)144 261.6 Q 2.5(wn-3c)-.15 G
(urv)-2.5 E 2.5(es)-.15 G -.15(eg)-2.5 G
(ments. Note: n must be at least 4.).15 E -.15(Fo)180 285.6 S(rtran:).15
E(subroutine crvn\(n, geom\))216 297.6 Q(inte)216 309.6 Q(ger n)-.15 E
(real geom\(3,n\))216 321.6 Q(C:)180 333.6 Q(crvn\(n, geom\))216 345.6 Q
15.72(long n;)252 357.6 R 8.5(Coord geom[][3];)252 369.6 R F1
(curveit\(n\))108 398.4 Q F0(Dra)144 410.4 Q 4.285(wac)-.15 G(urv)-4.285
E 4.285(es)-.15 G -.15(eg)-4.285 G 1.785
(ment by iterating the top matrix in the matrix stack as a forw).15 F
1.785(ard dif)-.1 F(ference)-.25 E
(matrix. This performs 'n' iterations.)144 422.4 Q -.15(Fo)180 446.4 S
(rtran:).15 E(subroutine curv)216 458.4 Q(eit\(n\))-.15 E(inte)216 470.4
Q(ger n)-.15 E(C:)180 494.4 Q(curv)216 506.4 Q(eit\(n\))-.15 E 13.5
(short n;)252 518.4 R/F2 10/Times-Bold@0 SF(Rectangles and General P)87
547.2 Q(olygon Routines.)-.2 E F0 1.73(See also)108 559.2 R F1 -1.11(Ve)
4.23 G(rte)1.11 E(x)-.2 E F0 1.73(calls abo)4.23 F -.15(ve)-.15 G 6.73
(.T).15 G 1.73(he w)-6.73 F 1.731(ay in which \214lled polygons \(inclu\
ding circles and arcs\) are treated)-.1 F
(depends on the mode that has been set with the)108 571.2 Q F1(polymode)
2.5 E F0(call.)2.5 E .459(There are v)108 588 R .458
(ariations on all these routines that end in ')-.25 F .458
(s' and also end in 'i'. In the case of the ')-.55 F .458(s' v)-.55 F
(ariations)-.25 E(the)108 600 Q 2.954(yt)-.15 G(ak)-2.954 E 2.954(ea)-.1
G -.18(rg)-2.954 G .455(uments of type Scoord in C and inte).18 F .455
(ger*2 in FOR)-.15 F .455(TRAN. In the case of the 'i' v)-.6 F .455
(ariations the)-.25 F(y)-.15 E(tak)108 612 Q 2.5(ea)-.1 G -.18(rg)-2.5 G
(uments of type Icoord in C and inte).18 E(ger in FOR)-.15 E(TRAN.)-.6 E
F1 -.37(re)108 628.8 S(ct\(x1, y1, x2, y2\)).37 E F0(Dra)144 640.8 Q 2.5
(war)-.15 G(ectangle.)-2.5 E -.15(Fo)180 664.8 S(rtran:).15 E
(subroutine rect\(x1, y1, x2, y2\))216 676.8 Q(real x1, y1, x1, y2)216
688.8 Q(C:)180 700.8 Q(rect\(x1, y1, x2, y2\))216 712.8 Q 8.5(Coord x1,)
252 724.8 R(y1, x2, y2;)2.5 E -.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)
159.41 E(20)199.28 E EP
%%Page: 21 21
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 10/Times-Italic@0 SF -.37(re)108 84 S(ctf\(x1, y1, x2, y2\)).37
E F0(Dra)144 96 Q 2.859(wa\214)-.15 G .359(lled rectangle. \(Ho)-2.859 F
2.859(wt)-.25 G .359(he \214lling is done may be changed by calling)
-2.859 F F1(polymode)2.859 E F0 2.859(,i)2.859 G 2.858(ft)-2.859 G .358
(his call)-2.858 F(has been compilied into the library\).)144 108 Q -.15
(Fo)180 132 S(rtran:).15 E(subroutine rectf\(x1, y1, x2, y2\))216 144 Q
(real x1, y1, x1, y2)216 156 Q(C:)180 168 Q(rectf\(x1, y1, x2, y2\))216
180 Q 8.5(Coord x1,)252 192 R(y1, x2, y2;)2.5 E F1(poly2\(n, points\))
108 220.8 Q F0(Construct a \(x, y\) polygon from an array of points pro)
144 232.8 Q(vided by the user)-.15 E(.)-.55 E -.15(Fo)180 256.8 S
(rtran:).15 E(subroutine poly2\(n, points\))216 268.8 Q(inte)216 280.8 Q
(ger n)-.15 E(real points\(2, n\))216 292.8 Q(C:)180 304.8 Q
(poly2\(n, points\))216 316.8 Q 15.72(long n;)252 328.8 R 8.5
(Coord points[][2];)252 340.8 R F1(polf2\(n, points\))108 369.6 Q F0
.496(Construct a \214lled \(x, y\) polygon from an array of points pro)
144 381.6 R .496(vided by the user)-.15 F 5.496(.\()-.55 G(Ho)-5.496 E
2.996(wt)-.25 G .497(he \214lling is)-2.996 F
(done may be changed by calling)144 393.6 Q F1(polymode)2.5 E F0 2.5(,i)
2.5 G 2.5(ft)-2.5 G(his call has been compilied into the library\).)-2.5
E -.15(Fo)180 417.6 S(rtran:).15 E(subroutine polf2\(n, points\))216
429.6 Q(inte)216 441.6 Q(ger n)-.15 E(real points\(2, n\))216 453.6 Q
(C:)180 465.6 Q 2.5(polf2\(n, points\))216 477.6 R 15.72(long n;)252
489.6 R 8.5(Coord points[][2];)252 501.6 R F1(poly\(n, points\))108
530.4 Q F0(Construct a polygon from an array of points pro)144 542.4 Q
(vided by the user)-.15 E(.)-.55 E -.15(Fo)180 566.4 S(rtran:).15 E
(subroutine poly\(n, points\))216 578.4 Q(inte)216 590.4 Q(ger n)-.15 E
(real points\(3, n\))216 602.4 Q(C:)180 614.4 Q 2.5(poly\(n, points\))
216 626.4 R 15.72(long n;)252 638.4 R 15.72(\215oat points[][3];)252
650.4 R F1(polf\(n, points\))108 679.2 Q F0 .656
(Construct a \214lled polygon from an array of points pro)144 691.2 R
.656(vided by the user)-.15 F 5.656(.\()-.55 G(Ho)-5.656 E 3.156(wt)-.25
G .655(he \214lling is done)-3.156 F(may be changed by calling)144 703.2
Q F1(polymode)2.5 E F0 2.5(,i)2.5 G 2.5(ft)-2.5 G
(his call has been compilied into the library\).)-2.5 E -.15(Fo)180
727.2 S(rtran:).15 E -.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)159.41 E
(21)199.28 E EP
%%Page: 22 22
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E(subroutine polf\(n, points\))216 84 Q(inte)216 96 Q(ger n)-.15 E
(real points\(3, n\))216 108 Q(C:)180 120 Q(polf\(n, points\))216 132 Q
15.72(long n;)252 144 R 8.5(Coord points[][3];)252 156 R/F1 10
/Times-Italic@0 SF(bac)108 184.8 Q(kface\(onof)-.2 E(f\))-.18 E F0 -.45
(Tu)144 196.8 S .974(rns on culling of backf).45 F .974
(acing polygons. A polygon is backf)-.1 F .974(acing if it')-.1 F 3.475
(so)-.55 G .975(rientation in *screen*)-3.475 F(coords is clockwise.)144
208.8 Q -.15(Fo)180 232.8 S(rtran:).15 E(subroutine backf)216 244.8 Q
(ace\(onof)-.1 E(f\))-.25 E(logical onof)216 256.8 Q(f)-.25 E(C:)180
280.8 Q(backf)216 292.8 Q(ace\(onof)-.1 E(f\))-.25 E .17(Boolean onof)
252 304.8 R(f;)-.25 E F1(fr)108 333.6 Q(ontface\(onof)-.45 E(f\))-.18 E
F0 -.45(Tu)144 345.6 S .895(rns on culling of frontf).45 F .894
(acing polygons. A polygon is frontf)-.1 F .894(acing if it')-.1 F 3.394
(so)-.55 G .894(rientation in *screen*)-3.394 F
(coords is anticlockwise.)144 357.6 Q -.15(Fo)180 381.6 S(rtran:).15 E
(subroutine frontf)216 393.6 Q(ace\(clockwise\))-.1 E(logical onof)216
405.6 Q(f)-.25 E(C:)180 429.6 Q(frontf)216 441.6 Q(ace\(clockwise\))-.1
E .17(Boolean onof)252 453.6 R(f;)-.25 E/F2 10/Times-Bold@0 SF -.92(Te)
87 482.4 S(xt r).92 E(outines.)-.18 E F0 .716(The original V)108 494.4 R
.716(OGLE hardw)-.4 F .716(are fonts "small" and "lar)-.1 F .716(ge" ha)
-.18 F 1.016 -.15(ve t)-.2 H .716(he font numbers 0 and 1 respecti).15 F
-.15(ve)-.25 G(ly).15 E 3.217(.T)-.65 G(he)-3.217 E(def)108 506.4 Q .553
(ault font is 0. F)-.1 F .552(or X11 displays the def)-.15 F .552
(ault fonts used by the program can be o)-.1 F -.15(ve)-.15 G .552
(rridden by placing the).15 F(follo)108 518.4 Q(wing def)-.25 E
(aults in the ~/.Xdef)-.1 E(aults \214le:)-.1 E -.2(vo)144 530.4 S
(gl.smallfont: <font name>).2 E -.2(vo)144 542.4 S(gl.lar).2 E
(gefont: <font name>)-.18 E F1(font\(fontid\))108 559.2 Q F0
(Set the current font)144 571.2 Q -.15(Fo)180 595.2 S(rtran:).15 E
(subroutine font\(fontid\))216 607.2 Q(inte)216 619.2 Q(ger fontid;)-.15
E(C:)180 643.2 Q(font\(fontid\))216 655.2 Q 13.5(short fontid;)252 667.2
R F1(cmo)108 696 Q(v\(x, y)-.1 E 2.5(,z)-.55 G(\))-2.5 E F0 1.473
(Change the current character position. The usual v)144 708 R 1.474
(ariations with the e)-.25 F 1.474(xtensions 'i' and ')-.15 F 1.474
(s' also)-.55 F(apply here.)144 720 Q -.4(VO)72 768 S(GL 1.2.8).4 E
(12 Oct 1993)159.41 E(22)199.28 E EP
%%Page: 23 23
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E -.15(Fo)180 84 S(rtran:).15 E(subroutine cmo)216 96 Q(v\(x, y)-.15
E 2.5(,z)-.65 G(\))-2.5 E(real x, y)216 108 Q 2.5(,z)-.65 G(;)-2.5 E(C:)
180 132 Q(cmo)216 144 Q(v\(x, y)-.15 E 2.5(,z)-.65 G(\))-2.5 E 8.5
(Coord x,)252 156 R 1.3 -.65(y, z)2.5 H(;).65 E/F1 10/Times-Italic@0 SF
(cmo)108 184.8 Q(v2\(x, y\))-.1 E F0 .636
(Change the current character position in x and y)144 196.8 R 3.136(.T)
-.65 G .636(he usual v)-3.136 F .635(ariations with the e)-.25 F .635
(xtensions 'i' and)-.15 F -.55('s)144 208.8 S 2.5('a).55 G
(lso apply here.)-2.5 E -.15(Fo)180 232.8 S(rtran:).15 E(subroutine cmo)
216 244.8 Q(v2\(x, y\))-.15 E(real x, y;)216 256.8 Q(C:)180 280.8 Q(cmo)
216 292.8 Q(v2\(x, y\))-.15 E 8.5(Coord x,)252 304.8 R(y;)2.5 E F1 -.1
(ge)108 333.6 S(theight\(\)).1 E F0
(Return the maximum height in the current font.)144 345.6 Q -.15(Fo)180
369.6 S(rtran:).15 E(inte)216 381.6 Q(ger function getheight)-.15 E(C:)
180 405.6 Q(long)216 417.6 Q(getheight\(\))216 429.6 Q F1(strwidth\(s\))
108 458.4 Q F0(Return the length of the string s in screen coords.)144
470.4 Q -.15(Fo)180 494.4 S(rtran:).15 E(inte)216 506.4 Q
(ger function strwidth\(s, n\))-.15 E(character *\(*\) s)252 518.4 Q
(inte)252 530.4 Q 5.88(ger n;)-.15 F(C:)180 554.4 Q(long)216 566.4 Q
(strwidth\(s\))216 578.4 Q 16.29(char *s;)252 590.4 R F1 -.15(ch)108
631.2 S(ar).15 E(str\(str\))-.1 E F0(Dra)144 643.2 Q 2.5(wt)-.15 G
(he te)-2.5 E(xt in string at the current position.)-.15 E -.15(Fo)180
667.2 S(rtran:).15 E(subroutine charst\(str)216 679.2 Q 2.5(,l)-.4 G
(en\))-2.5 E(character*\(*\) str)216 691.2 Q(inte)216 703.2 Q(ger len)
-.15 E(C:)180 727.2 Q -.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)159.41 E
(23)199.28 E EP
%%Page: 24 24
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E(charstr\(str\))216 84 Q(char *str;)252 96 Q/F1 10/Times-Bold@0 SF
-.74(Tr)87 124.8 S(ansf).74 E(ormations Routines.)-.25 E F0 .865
(All transformations are cumulati)108 136.8 R -.15(ve)-.25 G 3.365(,s)
.15 G 3.365(oi)-3.365 G 3.365(fy)-3.365 G .866
(ou rotate something and then do a translate you are translating)-3.365
F(relati)108 148.8 Q .892 -.15(ve t)-.25 H 3.092(ot).15 G .592
(he rotated ax)-3.092 F .591(es. If you need to preserv)-.15 F 3.091(et)
-.15 G .591(he current transformation matrix use pushmatrix\(\), do)
-3.091 F(the dra)108 160.8 Q
(wing, and then call popmatrix\(\) to get back where you were before.)
-.15 E/F2 10/Times-Italic@0 SF(tr)108 177.6 Q(anslate\(x, y)-.15 E 2.5
(,z)-.55 G(\))-2.5 E F0(Set up a translation.)144 189.6 Q -.15(Fo)180
213.6 S(rtran:).15 E(subroutine translate\(x, y)216 225.6 Q 2.5(,z)-.65
G(\))-2.5 E(real x, y)216 237.6 Q 2.5(,z)-.65 G(C:)180 249.6 Q
(translate\(x, y)216 261.6 Q 2.5(,z)-.65 G(\))-2.5 E 8.5(Coord x,)252
273.6 R 1.3 -.65(y, z)2.5 H(;).65 E F2(scale\(x, y)108 302.4 Q 2.5(,z)
-.55 G(\))-2.5 E F0(Set up scaling f)144 314.4 Q(actors in x, y)-.1 E
2.5(,a)-.65 G(nd z axis.)-2.5 E -.15(Fo)180 338.4 S(rtran:).15 E
(subroutine scale\(x, y)216 350.4 Q 2.5(,z)-.65 G(\))-2.5 E(real x, y)
216 362.4 Q 2.5(,z)-.65 G(C:)180 386.4 Q(scale\(x, y)216 398.4 Q 2.5(,z)
-.65 G(\))-2.5 E 8.5(Coord x,)252 410.4 R 1.3 -.65(y, z)2.5 H(;).65 E F2
-.45(ro)108 439.2 S(t\(angle).45 E 2.5(,a)-.1 G(xis\))-2.5 E F0 .143
(Set up a rotation in axis axis. Axis is one of 'x', 'y', or 'z'.)144
451.2 R .143(The angle in this case is a real number)5.143 F(in de)144
463.2 Q(grees.)-.15 E -.15(Fo)180 487.2 S(rtran:).15 E
(subroutine rot\(angle, axis\))216 499.2 Q(real angle)216 511.2 Q
(character axis)216 523.2 Q(C:)180 547.2 Q(rot\(angle, axis\))216 559.2
Q 15.72(\215oat angle;)252 571.2 R 16.29(char axis;)252 583.2 R F2 -.45
(ro)108 612 S(tate\(angle).45 E 2.5(,a)-.1 G(xis\))-2.5 E F0 .623(Set u\
p a rotation in axis axis. Axis is one of 'x', 'y', or 'z', and the ang\
le is in tenths of de)144 624 R(grees.)-.15 E(Mak)144 636 Q
(es you feel sentimental doesn')-.1 E 2.5(ti)-.18 G(t.)-2.5 E -.15(Fo)
180 660 S(rtran:).15 E(subroutine rotate\(angle, axis\))216 672 Q(inte)
216 684 Q(ger angle)-.15 E(character axis)216 696 Q(C:)180 720 Q -.4(VO)
72 768 S(GL 1.2.8).4 E(12 Oct 1993)159.41 E(24)199.28 E EP
%%Page: 25 25
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E(rotate\(angle, axis\))216 84 Q 9.06(Angle angle;)252 96 R 16.29
(char axis;)252 108 R/F1 10/Times-Bold@0 SF -.1(Pa)87 136.8 S
(tch Routines.).1 E/F2 10/Times-Italic@0 SF(patc)108 148.8 Q
(hbasis\(tbasisid, ubasisid\))-.15 E F0 .365
(De\214ne the t and u basis matrix id')144 160.8 R 2.865(so)-.55 G 2.865
(fap)-2.865 G .365(atch. It is assumed that tbasisid and ubasisid ha)
-2.865 F .666 -.15(ve m)-.2 H(atri-).15 E
(ces associated with them already \(this is done using the)144 172.8 Q
F2(defbasis)2.5 E F0(call\).)2.5 E -.15(Fo)180 196.8 S(rtran:).15 E
(subroutine patchbasis\(tid, uid\))216 208.8 Q(inte)216 220.8 Q
(ger tid, uid)-.15 E(C:)180 244.8 Q(patchbasis\(tid, ubid\))216 256.8 Q
15.72(long tid,)252 268.8 R(uid)2.5 E F2(patc)108 297.6 Q(hpr)-.15 E
(ecision\(tse)-.37 E .2 -.1(g, u)-.4 H(se).1 E(g\))-.4 E F0
(Set the minimum number of line se)144 309.6 Q(gments making up curv)
-.15 E(es in a patch.)-.15 E -.15(Fo)180 333.6 S(rtran:).15 E
(subroutine patchprecision\(tse)216 345.6 Q(g, use)-.15 E(g\))-.15 E
(inte)216 357.6 Q(ger tse)-.15 E(g, use)-.15 E(g)-.15 E(C:)180 381.6 Q
(patchprecision\(tse)216 393.6 Q(g, use)-.15 E(g\))-.15 E 10(long tse)
252 405.6 R(g, use)-.15 E(g;)-.15 E F2(patc)108 434.4 Q
(hcurves\(nt, nu\))-.15 E F0(Set the number of curv)144 446.4 Q
(es making up a patch.)-.15 E -.15(Fo)180 470.4 S(rtran:).15 E
(subroutine patchcurv)216 482.4 Q(es\(nt, nu\))-.15 E(inte)216 494.4 Q
(ger nt, nu)-.15 E(C:)180 518.4 Q(patchcurv)216 530.4 Q(es\(nt, nu\))
-.15 E 10(long nt,)252 542.4 R(nu;)2.5 E F2(rpatc)108 571.2 Q(h\(gx, gy)
-.15 E 2.5(,g)-.55 G(z, gw\))-2.5 E F0(Dra)144 583.2 Q .247(ws a ration\
al patch in the current basis, according to the geometry matrices gx, g\
y)-.15 F 2.747(,g)-.65 G .247(z, and gw)-2.747 F(.)-.65 E -.15(Fo)180
607.2 S(rtran:).15 E(subroutine rpatch\(gx, gy)216 619.2 Q 2.5(,g)-.65 G
(z, gw\))-2.5 E 2.5(real gx\(4,4\),)216 631.2 R
(gy\(4,4\), gz\(4,4\), gw\(4,4\))2.5 E(C:)180 655.2 Q(rpatch\(gx, gy)216
667.2 Q 2.5(,g)-.65 G(z, gw\))-2.5 E 2.5(Matrix gx,)226 679.2 R(gy)2.5 E
2.5(,g)-.65 G(z, gw;)-2.5 E -.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)
159.41 E(25)199.28 E EP
%%Page: 26 26
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 10/Times-Italic@0 SF(patc)108 84 Q(h\(gx, gy)-.15 E 2.5(,g)-.55
G(z\))-2.5 E F0(Dra)144 96 Q(ws a patch in the current basis, according\
 to the geometry matrices gx, gy)-.15 E 2.5(,a)-.65 G(nd gz.)-2.5 E -.15
(Fo)180 120 S(rtran:).15 E(subroutine patch\(gx, gy)216 132 Q 2.5(,g)
-.65 G(z\))-2.5 E 2.5(real gx\(4,4\),)216 144 R(gy\(4,4\), gz\(4,4\))2.5
E(C:)180 168 Q(patch\(gx, gy)216 180 Q 2.5(,g)-.65 G(z\))-2.5 E 2.5
(Matrix gx,)252 192 R(gy)2.5 E 2.5(,g)-.65 G(z;)-2.5 E/F2 10
/Times-Bold@0 SF -.2(Po)87 220.8 S(int Routines.).2 E F0 .458
(There are v)108 232.8 R .458
(ariations on all these routines that end in ')-.25 F .458
(s' and also end in 'i'. In the case of the ')-.55 F .459(s' v)-.55 F
(ariations)-.25 E(the)108 244.8 Q 2.955(yt)-.15 G(ak)-2.955 E 2.955(ea)
-.1 G -.18(rg)-2.955 G .455(uments of type Scoord in C and inte).18 F
.455(ger*2 in FOR)-.15 F .454(TRAN. In the case of the 'i' v)-.6 F .454
(ariations the)-.25 F(y)-.15 E(tak)108 256.8 Q 2.5(ea)-.1 G -.18(rg)-2.5
G(uments of type Icoord in C and inte).18 E(ger in FOR)-.15 E(TRAN.)-.6
E F1(pnt\(x, y)108 273.6 Q 2.5(,z)-.55 G(\))-2.5 E F0(Dra)144 285.6 Q
2.5(wap)-.15 G(oint at x, y)-2.5 E 2.5(,z)-.65 G -.15(Fo)180 309.6 S
(rtran:).15 E(subroutine pnt\(x, y)216 321.6 Q 2.5(,z)-.65 G(\))-2.5 E
(real x, y)216 333.6 Q 2.5(,z)-.65 G(C:)180 357.6 Q(pnt\(x, y)216 369.6
Q 2.5(,z)-.65 G(\))-2.5 E 8.5(Coord x,)252 381.6 R 1.3 -.65(y, z)2.5 H
(;).65 E F1(pnt2\(x, y\))108 410.4 Q F0(Dra)144 422.4 Q 2.5(wap)-.15 G
(oint at x, y)-2.5 E(.)-.65 E -.15(Fo)180 446.4 S(rtran:).15 E
(subroutine pnt2\(x, y\))216 458.4 Q(real x, y)216 470.4 Q(C:)180 494.4
Q(pnt2\(x, y\))216 506.4 Q 8.5(Coord x,)252 518.4 R(y;)2.5 E F2
(Object Routines.)87 547.2 Q F0 2.574
(Objects are graphical entities created by the dra)108 559.2 R 2.574
(wing routines called between)-.15 F F1(mak)5.074 E(eobj)-.1 E F0(and)
5.074 E F1(closeobj.)5.074 E F0 2.091(Objects may be called from within\
 other objects. When an object is created most of the calculations)108
571.2 R .616(required by the dra)108 583.2 R .616(wing routines called \
within it are done up to where the calculations in)-.15 F -.2(vo)-.4 G
(lv).2 E 3.117(et)-.15 G .617(he current)-3.117 F .896
(transformation matrix. So if you need to dra)108 595.2 R 3.396(wt)-.15
G .896(he same thing se)-3.396 F -.15(ve)-.25 G .895
(ral times on the screen b).15 F .895(ut in dif)-.2 F(ferent)-.25 E
(places it is f)108 607.2 Q
(aster to use objects than to call the appropriate dra)-.1 E
(wing routines each time.)-.15 E F1(mak)108 624 Q(eobj\(n\))-.1 E F0
(Commence the object number n.)144 636 Q -.15(Fo)180 660 S(rtran:).15 E
(subroutine mak)216 672 Q(eobj\(n\))-.1 E(inte)216 684 Q(ger n)-.15 E
(C:)180 708 Q(mak)216 720 Q(eobj\(n\))-.1 E -.4(VO)72 768 S(GL 1.2.8).4
E(12 Oct 1993)159.41 E(26)199.28 E EP
%%Page: 27 27
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E 6.84(Object n;)252 84 R/F1 10/Times-Italic@0 SF(closeobj\(\))108
112.8 Q F0(Close the current object.)144 124.8 Q -.15(Fo)180 148.8 S
(rtran:).15 E(subroutine closeobj\(\))216 160.8 Q(C:)180 184.8 Q
(closeobj\(\))216 196.8 Q F1 -.1(ge)108 225.6 S(nobj\(\)).1 E F0
(Returns a unique object identi\214er)144 237.6 Q(.)-.55 E -.15(Fo)180
261.6 S(rtran:).15 E(inte)216 273.6 Q(ger function genobj\(\))-.15 E(C:)
180 297.6 Q(Object)216 309.6 Q(genobj\(\))216 321.6 Q F1 -.1(ge)108
350.4 S(topenobj\(\)).1 E F0(Return the number of the current object.)
144 362.4 Q -.15(Fo)180 386.4 S(rtran:).15 E(inte)216 398.4 Q
(ger function getopenobj\(\))-.15 E(C:)180 422.4 Q(Object)216 434.4 Q
(getopenobj\(\))216 446.4 Q F1(callobj\(n\))108 475.2 Q F0(Dra)144 487.2
Q 2.5(wo)-.15 G(bject number n.)-2.5 E -.15(Fo)180 511.2 S(rtran:).15 E
(subroutine callobj\(n\))216 523.2 Q(inte)216 535.2 Q(ger n)-.15 E(C:)
180 559.2 Q(callobj\(n\))216 571.2 Q 6.84(Object n;)252 583.2 R F1
(isobj\(n\))108 612 Q F0
(Returns non-zero if there is an object of number n.)144 624 Q -.15(Fo)
180 648 S(rtran:).15 E(logical function isobj\(n\))216 660 Q(inte)216
672 Q(ger n)-.15 E(C:)180 696 Q(Boolean)216 708 Q(isobj\(n\))216 720 Q
-.4(VO)72 768 S(GL 1.2.8).4 E(12 Oct 1993)159.41 E(27)199.28 E EP
%%Page: 28 28
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E 6.84(Object n;)252 84 R/F1 10/Times-Italic@0 SF(delobj\(n\))108
112.8 Q F0(Delete the object number n.)144 124.8 Q -.15(Fo)180 148.8 S
(rtran:).15 E(subroutine delobj\(n\))216 160.8 Q(inte)216 172.8 Q(ger n)
-.15 E(C:)180 196.8 Q(delobj\(n\))216 208.8 Q 6.84(Object n;)252 220.8 R
/F2 10/Times-Bold@0 SF(Double Buffering)87 249.6 Q(.)-.15 E F0 .273
(Where possible V)108 261.6 R .273(OGL allo)-.4 F .274
(ws for front and back b)-.25 F(uf)-.2 E .274(fers to enable things lik)
-.25 F 2.774(ea)-.1 G .274(nimation and smooth updat-)-2.774 F
(ing of the screen. Note: it isn')108 273.6 Q 2.5(tp)-.18 G
(ossible to ha)-2.5 E .3 -.15(ve b)-.2 H(ackb).15 E(uf)-.2 E
(fer and frontb)-.25 E(uf)-.2 E(fer true at the same time.)-.25 E F1
(gcon\214g)108 290.4 Q F0 -.4(Wi)6.56 G
(th Iris GL you must call gcon\214g for things lik).4 E 2.5(ed)-.1 G
(oubleb)-2.5 E(uf)-.2 E(fering to tak)-.25 E 2.5(ee)-.1 G -.25(ff)-2.5 G
(ect.).25 E -.15(Fo)180 314.4 S(rtran:).15 E(subroutine gcon\214g)216
326.4 Q(C:)180 350.4 Q(gcon\214g\(\))216 362.4 Q F1(doubleb)108 391.2 Q
(uf)-.2 E(fer)-.18 E F0(Flags our intention to do double b)144 403.2 Q
(uf)-.2 E(fering.)-.25 E -.15(Fo)180 427.2 S(rtran:).15 E
(subroutine doubleb)216 439.2 Q(uf)-.2 E(fer)-.25 E(C:)180 463.2 Q
(doubleb)216 475.2 Q(uf)-.2 E(fer\(\))-.25 E F1(singleb)108 504 Q(uf)-.2
E(fer)-.18 E F0(Switch back to singleb)144 516 Q(uf)-.2 E(fer mode.)-.25
E -.15(Fo)180 540 S(rtran:).15 E(subroutine singleb)216 552 Q(uf)-.2 E
(fer)-.25 E(C:)180 576 Q(singleb)216 588 Q(uf)-.2 E(fer\(\))-.25 E F1
(bac)108 616.8 Q(kb)-.2 E(uf)-.2 E(fer\(Boolean\))-.18 E F0(Mak)144
628.8 Q 2.5(eV)-.1 G(OGL dra)-2.9 E 2.5(wi)-.15 G 2.5(nt)-2.5 G
(he backb)-2.5 E(uf)-.2 E(fer)-.25 E(.)-.55 E -.15(Fo)180 652.8 S
(rtran:).15 E(subroutine backb)216 664.8 Q(uf)-.2 E(fer\(yesno\))-.25 E
6.28(logical yesno;)252 676.8 R(C:)180 700.8 Q(backb)216 712.8 Q(uf)-.2
E(fer\(yesno\))-.25 E .17(Boolean yesno;)252 724.8 R -.4(VO)72 768 S
(GL 1.2.8).4 E(12 Oct 1993)159.41 E(28)199.28 E EP
%%Page: 29 29
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.4(VO)72 48 S 387.44(GL\(3\) V).4 F(OGL\(3\))
-.4 E/F1 10/Times-Italic@0 SF(fr)108 84 Q(ontb)-.45 E(uf)-.2 E
(fer\(Boolean\))-.18 E F0(Mak)144 96 Q 2.5(eV)-.1 G(OGL dra)-2.9 E 2.5
(wi)-.15 G 2.5(nt)-2.5 G(he front b)-2.5 E(uf)-.2 E(fer)-.25 E(.)-.55 E
-.15(Fo)180 120 S(rtran:).15 E(subroutine frontb)216 132 Q(uf)-.2 E
(fer\(yesno\))-.25 E 6.28(logical yesno;)252 144 R(C:)180 168 Q(frontb)
216 180 Q(uf)-.2 E(fer\(yesno\))-.25 E .17(Boolean yesno;)252 192 R F1
(swapb)108 220.8 Q(uf)-.2 E(fer)-.18 E(s\(\))-.1 E F0(Sw)144 232.8 Q
(ap the front and back b)-.1 E(uf)-.2 E(fers.)-.25 E -.15(Fo)180 256.8 S
(rtran:).15 E(subroutine sw)216 268.8 Q(apb)-.1 E(uf)-.2 E(fers)-.25 E
(C:)180 292.8 Q(sw)216 304.8 Q(apb)-.1 E(uf)-.2 E(fers\(\))-.25 E/F2 10
/Times-Bold@0 SF -.2(Po)87 333.6 S(sition Routines.).2 E F1 -.1(ge)108
345.6 S(tgpos\(x, y).1 E 2.5(,z)-.55 G 2.5(,w)-2.5 G(\))-2.5 E F0
(Gets the current graphics position in w)144 357.6 Q(orld coords.)-.1 E
-.15(Fo)180 381.6 S(rtran:).15 E(subroutine getgpos\(x, y)216 393.6 Q
2.5(,z)-.65 G 2.5(,w)-2.5 G(\))-2.5 E(real x, y)216 405.6 Q 2.5(,z)-.65
G(C:)180 429.6 Q(getgpos\(x, y)216 441.6 Q 2.5(,z)-.65 G 2.5(,w)-2.5 G
(\))-2.5 E(Coord *x, *y)252 453.6 Q 2.5(,*)-.65 G(z, *w;)-2.5 E F1 -.1
(ge)108 482.4 S(tcpos\(ix, iy\)).1 E F0
(Gets the current character position in screen coords.)144 494.4 Q -.15
(Fo)180 518.4 S(rtran:).15 E(subroutine getcpo\(ix, iy\))216 530.4 Q
(inte)216 542.4 Q(ger ix, iy)-.15 E(C:)180 566.4 Q(getcpos\(ix, iy\))216
578.4 Q(Scoord *ix, *iy;)252 590.4 Q/F3 9/Times-Bold@0 SF -.09(BU)72
619.2 S(GS).09 E F0(Double b)108 631.2 Q(uf)-.2 E(fering isn')-.25 E 2.5
(ts)-.18 G(upported on all de)-2.5 E(vices.)-.25 E
(The yobbarays may be turned on or the)108 648 Q 2.5(ym)-.15 G
(ay be turned of)-2.5 E(f.)-.25 E -.4(VO)72 768 S(GL 1.2.8).4 E
(12 Oct 1993)159.41 E(29)199.28 E EP
%%Trailer
end
%%EOF
.865
(fap)-2.865 G .365(atch. It is assumed that tbasisid and ubasisid ha)
-2.865 F .666 -.15(ve m)-.2 H(atri-).15 E
(ces associated with them already \(this is done using the)144 172.8 Q
F2(defbasis)2.5 E F0(call\).)2.5 E -.15(Fo)180 196.8 S(rtran:).15 E
(subroutine patchbasis\(tid, uid\))216 208.8 Q(inte)216 220.8 Q
(ger tid, uid)-.15 E(C:)180 244.8 Q(patchbasis\(tid, ubid\))216 256.8 Q
15.72(long tid,)252 268.8 R(uid)2.5 E F2(patc)108 297.6 Q(hpr)-.15 E
(ecision\(tse)-.37 E .2 -.1(g, u)-.4 H(se).1 Evogl/drivers/004077500017740000012000000000000561260337000141235ustar00berniedecr377777770000005vogl/drivers/ibmpc/004077500017740000012000000000000545673553200152315ustar00berniedecr377777770000005vogl/drivers/ibmpc/cga.c010066400017740000012000000047420517275403600161260ustar00berniedecr377777770000005#include	"vogl.h"
#include	<stdio.h>
#ifdef TC
#include	<dos.h>
#define		_dos_allocmem	allocmem
#define		_dos_freemem	freemem
#endif

#define		C_PIX_ASPECT	2.4
#define		NPARA	(640 * 200 / 16)

static	unsigned	allocated = 0, old_mode;
static	unsigned	char	*backbuf;

extern	unsigned	int	_buffer_segment;
extern	unsigned	int	_buffer_offset;
extern	unsigned	int	_cur_color;
static	unsigned	int	save_seg;

extern	int	cga_clear(),
		cga_frontbuf(),
		cga_swapbuf(),
		_cga_set_buffer(),
		pc_fill(),
		pc_font(),
		pc_getkey(),
		pc_checkkey(),
		pc_locator(),
		pc_string(),
		setmode();


static int
cga_init()
{
	vdevice.sizeX = 199 * C_PIX_ASPECT;
	vdevice.sizeY = 199;
	vdevice.sizeSx = 639;
	vdevice.sizeSy = 199;
	vdevice.depth = 1;
	_buffer_segment = 0xB800;
	_buffer_offset = 0;
	_cur_color = 1;
	old_mode = setmode(6);
	pc_locinit(vdevice.sizeSx, vdevice.sizeSy);
	return (1);
}

/* 
 * cga_vclear
 *
 *	Just clears the current viewport.
 */
static
cga_vclear()
{
	int     x[4], y[4];

	if (vdevice.maxVx != vdevice.sizeSx
		|| vdevice.maxVy != vdevice.sizeSy
		|| vdevice.minVx != vdevice.sizeSx
		|| vdevice.minVy != vdevice.sizeSy) {
		x[0] = x[3] = vdevice.minVx;
		y[0] = y[1] = vdevice.maxVy;
		y[2] = y[3] = vdevice.minVy;
		x[1] = x[2] = vdevice.maxVx;

		pc_fill(5, x, y);
	} else {
		cga_clear();
	}

	return(0);
}


/*
 * cga_exit
 *
 *	Sets the display back to text mode.
 */
static
cga_exit()
{
	unshowmouse();
	if (allocated)
		_dos_freemem(save_seg);

	setmode(old_mode);
	return (1);
}

static
cga_draw(x, y)
	int	x, y;
{
	cgaline(vdevice.cpVx, vdevice.sizeSy - vdevice.cpVy, x, vdevice.sizeSy - y, _cur_color);
	vdevice.cpVx = x;
	vdevice.cpVy = y;

	return(0);
}

static
cga_char(c)
	int	c;
{
	cgachar(c, vdevice.cpVx, vdevice.sizeSy - vdevice.cpVy, _cur_color, 1 - _cur_color);
	return(0);
}

static
cga_color(i)
	int	i;
{
	_cur_color = (i > 0 ? 1 : 0);

	return(0);
}

static
cga_backbuf()
{
	if (!allocated) {
		if (_dos_allocmem(NPARA, &_buffer_segment) != 0)
			verror("cga_backbuf: couldn't allocate space");

		allocated = 1;
		save_seg = _buffer_segment;
	}
	return(1);
}

static	int
noop()
{
	return (-1);
}

static DevEntry cgadev = {
	"cga",
	"large",
	"small",
	cga_backbuf,
	cga_char,
	pc_checkkey,
	cga_vclear,
	cga_color,
	cga_draw,
	cga_exit,
	pc_fill,
	pc_font,
	cga_frontbuf,
	pc_getkey,
	cga_init,
	pc_locator,
	noop,
	noop,
	noop,
	pc_string,
	cga_swapbuf,
	noop
};

/*
 * _cga_devcpy
 *
 *	copy the pc device into vdevice.dev.
 */
_cga_devcpy()
{
	vdevice.dev = cgadev;

	return(0);
}

vogl/drivers/ibmpc/cga_buf.asm010066400017740000012000000024450504146104200173010ustar00berniedecr377777770000005	COMMENT	$

		Handles Double Buffering on the CGA.
	$

		extrn	__buffer_segment:word
		extrn	__buffer_offset:word

		public	_cga_swapbuf, _cga_frontbuf

CGAA_TEXT	SEGMENT	byte	public	'CODE'
 		ASSUME	cs:CGAA_TEXT

	COMMENT	$
		Copies the RAM buffer to display buffer.
	$

_cga_swapbuf	proc	far
	push		bp
	mov		bp, sp
	sub		sp, 8

	push		es
	push		ds
	push		si
	push		di

	mov		ax, 0b800h	
	mov		es, ax		; ES:DI -> video buffer
	xor		di, di

	mov		ax, __buffer_segment
	mov		ds, ax
	mov		si, __buffer_offset	; DS:SI -> buffer in RAM

	;jmp		bonk


	; Wait for verticle blanking interval
	mov		dx, 3DAh	; CGA status port
L01:
	mov		cx, 22		; HRT timeout val
L02:	
	in		al, dx
	test		al, 8
	jnz		L02
	test		al, 1
	jnz		L02

	cli
L03:
	in		al, dx
	test		al, 1
	loopnz		L03

	sti

	jz		L01
	
	; Blank the display
	mov		dl, 0D8h
	mov		al, ((1 SHL 4) OR (1 SHL 5))
	out		dx, al

	; Move the data
	mov		cx, 2000h		; Size of buffer.
bonk:
	cld
	rep		movsw 

	; Reenable the Display

	or		al, (1 SHL 5)
	out		dx, al

	pop		di
	pop		si
	pop		ds
	pop		es
	
	mov		sp, bp
	pop		bp
	ret
_cga_swapbuf		endp


	COMMENT	$
		Write into the screen buffer.
	$

_cga_frontbuf	proc	far
	push		bp
	mov		bp, sp
	
	mov		__buffer_segment, 0b800h
	mov		__buffer_offset, 0

	mov		sp, bp
	pop		bp
	ret
_cga_frontbuf		endp

CGAA_TEXT		ends

			end
vogl/drivers/ibmpc/cgachar.asm010066400017740000012000000055040504146104300173030ustar00berniedecr377777770000005;
; Name:		_cgachar
;
; Function:	Display a character in 640*200 2-colour mode
;
; Call:		Microsoft C:
;
;		void
;		_cgachar(c, x, y, fgd, bkgd)
;		int	c;			/* character code */
;		int	x, y;			/* upper left pixel */
;		int	fgd, bkgd;		/* fore and background pixel values */
;
;

argc		equ	word ptr [bp+6]	; stack frame addressing
argx		equ	word ptr [bp+8]
argy		equ	word ptr [bp+10]
argfgd		equ	byte ptr [bp+12]
argbkgd		equ	byte ptr [bp+14]

varmask		equ	[bp-8]
vartoggle	equ	[bp-10]

		extrn	_chartab:word
		extrn	__fontsize:word
		extrn	cgapaddr:far

CGAA_TEXT	segment byte public 'CODE'
		assume	cs:CGAA_TEXT

		public	_cgachar
_cgachar	proc	far

		push	bp		; preserve call registers
		mov	bp,sp
		sub	sp,8		; stack space for local variables
		push	di
		push	si
		push	ds

; set up foreground pixel toggle mask

		mov	ah,argfgd	; AH = 0 or 1 (foreground pixel value)
		ror	ah,1		; high order bit of AH = 0 or 1
		cwd			; propogate high-order bit through DX
		not	dx
		mov	vartoggle,dx

; calculate first pixel address

		mov	ax,argy		; ax = y
		mov	bx,argx		; bx = x
		sub	ax,__fontsize
		call	cgapaddr	; ES:BX -> buffer
					; CL = # bits to shift left

		xor	cl,7		; CL = # bits to rotate right

		mov	ax,0FF00h
		ror	ax,cl		; AX = bit mask in proper position
		mov	varmask,ax

; set up video buffer addressing

		mov	dx,2000h	; increment for video buffer interleave
		mov	di,80-2000h	; increment from last to first interleave
		test	bx,2000h	; set zero flag if BX is 1st interleave
		jz	L01

		xchg	di,dx		; exchange increment values if 1st pixel
					; lies in 1st interleave

; set up character definition table addressing

L01:		mov	ch,byte ptr __fontsize
		cmp	ch,16
		je	largel

		mov	ax,0f000h
		mov	ds,ax
		mov	ax,0fa6eh
		mov	si,ax
		
		jmp	cont1
largel:
		mov	ax, SEG _chartab
		mov	ds, ax
		mov	si, OFFSET _chartab
cont1:
		mov	ax,argc
		mul	ch
		add	si,ax
		
		test	cl,cl		; test # bits to rotate
		jnz	L20		; jump if character is not byte aligned

; routine for byte-aligned characters

		mov	ah,vartoggle	; AH = foreground toggle mask
		xchg	ch,cl		; CX = points

L10:		lodsb			; AL = bit patterb for next pixel row
		xor	al,ah		; toggle pixels if foreground = 0
		mov	es:[bx],al	; store pixels in buffer

		add	bx,dx		; BX = next row in buffer
		xchg	di,dx		; swap buffer increments
		loop	L10
		jmp	short Lexit

; routine for non byte-aligned characters

L20:		mov	ax,varmask
		and	es:[bx],ax	; mask character pixels in buffer

		xor	ah,ah
		lodsb			; AX = bit pattern for next pixel row
		xor	al,vartoggle	; toggle pixels if foreground = 0

		ror	ax,cl		; rotate pixels into position
		or	es:[bx],ax	; store pixels in buffer

		add	bx,dx		; BX = next row in buffer
		xchg	di,dx		; swap buffer increments
		dec	ch
		jnz	L20

Lexit:		pop	ds		; restore caller registers and return
		pop	si
		pop	di
		mov	sp,bp
		pop	bp
		ret

_cgachar	endp

CGAA_TEXT	ends

		end
vogl/drivers/ibmpc/cgaline.asm010066400017740000012000000116210504146104300173120ustar00berniedecr377777770000005	TITLE	CGALINE - Fast line drawing routine.
	NAME	CGALINE
	PAGE	55,132

	COMMENT	$

	Name:		CGALINE

	Function:	Draw a line in 640x200 2-color mode

	Caller:		Microsoft C:

			void 	cgaline(x1, y1, x2, y2, n);

			int	x1, y1, x2, y2;		/* pixel co-ords */
			int	n;			/* pixel value */


		$


; Stack frame addressing - LARGE CODE MODEL

ARGx1		EQU	word ptr [bp+6]
ARGy1		EQU	word ptr [bp+8]
ARGx2		EQU	word ptr [bp+10]
ARGy2		EQU	word ptr [bp+12]
ARGn		EQU	byte ptr [bp+14]

VARleafincr	EQU	word ptr [bp-6]
VARincr1	EQU	word ptr [bp-8]
VARincr2	EQU	word ptr [bp-10]
VARroutine	EQU	word ptr [bp-12]

ByteOffsetShift	EQU	3	; Used to convert pixels to byte offset

DGROUP		GROUP	CGAA_DATA

		EXTRN	cgapaddr:far

CGAA_TEXT	SEGMENT	byte public 'CODE'
		ASSUME	cs:CGAA_TEXT,ds:DGROUP

		PUBLIC	_cgaline

_cgaline	PROC	far

		push	bp	; Set up stack frame
		mov	bp,sp
		sub	sp,12	; Stack space for local variables
		push	si
		push	di

		mov	si,2000h	; Increment for video buffer interleave
		mov	di,80-2000h	; Increment for last to first interleave
; check for vertical line

		mov	cx,ARGx2
		sub	cx,ARGx1
		jz	VertLine

; force x1 < x2

		jns	L01	; jump if x2 > x1

		neg	cx	; CX = x1 - x2

		mov	bx,ARGx2; exchange x1 and x2
		xchg	bx,ARGx1
		mov	ARGx2,bx

		mov	bx,ARGy2; exchange y1 and y2
		xchg	bx,ARGy1
		mov	ARGy2,bx

; calc dy = abs(y2 - y1)

L01:
		mov	bx,ARGy2
		sub	bx,ARGy1; BX = y2 - y1
		jnz	L02
		jmp	HorizLine
L02:
		jns	L03

		neg	bx	; BX = y1 - y2
		neg	si	; negate increment for buffer interleave
		neg	di
		xchg	si,di

; select appropriate routine for slope of line

L03:
		mov	VARleafincr,di; save increment for buffer interleave
		mov	VARroutine,offset LoSlopeLine
		cmp	bx,cx
		j
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2009 MARUHN Internet Solutions