home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / opengl / xlib / README < prev    next >
Encoding:
Text File  |  1994-08-02  |  23.5 KB  |  675 lines

  1.  
  2.              ~4Dgifts/toolbox/src/exampleCode/opengl/xlib README 
  3.  
  4.  
  5.                 THIS CODE RUNS/COMPILES ON 5.1 Irix OR LATER
  6.                 THIS CODE WILL NOT RUN ON LESS THAN 5.1 Irix
  7.  
  8.  
  9.  
  10.     This is a collection of sample OpenGL programs for those who prefer 
  11.     going the stone-knives-and-bearskins route with only Xlib rather than 
  12.     working with toolkits like Xt, Motif or the OpenGL's own libGLw.a (the
  13.     motif widget) libtk.a and/or libaux.a.
  14.  
  15.     Note that in the siggraphCD subtree there are libtk/libaux versions of 
  16.     some of the straight Xlib-based programs living here, located in 
  17.     ../siggraphCD/src/examples/samples.  There are people who prefer or
  18.     need to work from the ground up.  Thus the justification for the 
  19.     existence of this, perhaps somewhat paltry, but better-than-nothing,
  20.     "ground-floor" examples directory.
  21.  
  22.     Of special note in v4.1 are tprim_pup and zrgb_pup both of which implement
  23.     a pure-Xlib version of the "IrisGL-type" pup menu capability making use of
  24.     the {pup.c,pup.h} files.  This code was ripped out of the IrixGL-X 
  25.     implementation and munged around a little, so it is exactly dopup, 
  26.     addtopup, etc. (however there *is* an extra screen & display argument to
  27.     make it work with X).  The code is not pretty, but it does work and now
  28.     can offer people an alternative to having to go with a toolbox on top of
  29.     Xlib just to get popup menus included.  See README.pup for a refresher set
  30.     of descriptions lifted from the pup menu man pages on 
  31.        long newpup(Display *dpy, int screen)
  32.        void addtopup(long pup, char *str, ...)
  33.        long defpup(Display *dpy, int screen, char *str, ...)
  34.        long dopup(long menu)
  35.        void freepup(long menu)
  36.        void setpup(long menu, long item, unsigned long arg)
  37.     as they now can be used in OpenGL-Xlib programs.
  38.  
  39.     ++> indicates new as of version 4.1
  40.     =+> indicates enhanced as of version 4.1
  41.  
  42.  
  43.     
  44. ++> aaline:     demonstrates anti-aliaed line, aliasing can be toggled, the 
  45.         line can be rotated, its width can be increased/decreased, 
  46.         and stippling can be toggled.
  47.         RGBA, singlebuffer
  48.       cmd line options:
  49.        -c       color index mode
  50.       keys:
  51.         O/o     rotate counter-clockwise
  52.         P/p     rotate clockwise
  53.     Q/q     decrement line's width
  54.     W/w     increment line's width
  55.     A/a     toggle anti-aliasing on/off (initial state: anti-aliasing ON)
  56.     L/l     toggle line stipple on/off (initial state: line-stippling OFF)
  57.     Esc     quit
  58.  
  59.  
  60. ==> bufferogl:  demonstrates switching between single and double -buffer
  61.         mode.  A useful technique for bitplane-limited machines like 
  62.         Indigo starter or the 8-bit Personal IRIS or Indy.  employs
  63.         materials/lighting, zbuffer, single/double -buffer, drawing
  64.         spheres.
  65.     RGBA, singlebuffer, doublebuffer, depthbuffer
  66.       keys:
  67.     LEFTMOUSE    switch to single buffer
  68.     MIDDLEMOUSE  switch to double buffer
  69.     RIGHTMOUSE   animate to visualize the current buffer mode
  70.         Esx     quit
  71.  
  72.  
  73. ==> cull: shows the effect of culling on an ordered set of triangles
  74.       representing all the permutations of vertex ordering for both
  75.       smooth and flat shading
  76.     RGBA, singlebuffer
  77.       keys:
  78.         0          select front face
  79.     1          select back face
  80.     2          select both front and back faces
  81.     p/P        display polygon using points
  82.     l/L        display polygon using lines
  83.     f/F        display pologon as filled
  84.     d/D        toggle cw/ccw interpretation of front face
  85.     c/C        cull current face
  86.     e/E    toggle enable/disable culling
  87.     Esc    quit
  88.  
  89.  
  90. ==> cylinder2:  demonstrates creating a GL window with an overlay window
  91.         on top of it occupying the same position.
  92.     RGBA, doublebuffer, alphablending, depthbuffer
  93.       keys:
  94.     LEFTMOUSE  drag/move cylinder
  95.     w       toggles an overlay wire frame on cylinder
  96.     t       toggles scene transparency
  97.     KeyBd   quit
  98.  
  99.  
  100. ==> dnbogl: imitation of the Dial Button Box Confidence Test in the "System"
  101.         toolchest.  two windows, 1 single 1 double -buffered, side-by-side.
  102.     CI, singlebuffer and doublebuffer
  103.       keys:
  104.     Dial Buttons  press to highlight representation in GL window
  105.         Dial Dials    turn to highlight representation in GL window
  106.     LEFTMOUSE     quit
  107.  
  108.  
  109. ==> font:  demonstrates a replaced for the IRIS GL charstr() function
  110.        RGBA, singlebuffer
  111.       keys:
  112.     KeyBd   quit
  113.  
  114.  
  115. ++> fonts:  demonstrates rendering multiple fonts, one-at-a-time.
  116.        RGBA, doublebuffer
  117.       keys:
  118.     f       step thru 4 different fonts
  119.     KeyBd   quit
  120.  
  121.  
  122. ==> glxvis: provide text of visuals information for machine being run on
  123.  
  124.  
  125. ==> intro:  standalone program listing from the glXintro man page
  126.     RGBA, singlebuffer
  127.  
  128.  
  129. ==> iobouce:  animated ball speeds up by pressing the mouse buttons
  130.     CI, doublebuffer
  131.       keys:
  132.         RIGHTMOUSE   stops disk
  133.     MIDDLEMOUSE  increases y velocity
  134.     LEFTMOUSE    increases x velocity
  135.     Esc    quit
  136.  
  137.  
  138. ++> jackobox: This program creates a nest of seven single-buffered RGB windows. 
  139.               A single OpenGL rendering context is bound to each window in turn
  140.           and a clear is done to the window (each window cleared to a 
  141.           different color).  Finally, this message is drawn using X.  If 
  142.           you can't read the message, the program didn't work.
  143.        RGBA, singlebuffer
  144.       keys:
  145.      SPACEBAR:  steps thru a "colorbase" scheme that changes each time 
  146.             in/for each window
  147.      Esc  quit
  148.  
  149.  
  150. ++> multcx:  creates two GLX contexts, and alternately draws into the same 
  151.          window with them.  written to test functioning of multiple 
  152.          contexts drawing to same window w/depth buffer
  153.        RGBA, depthbuffer
  154.       keys:
  155.      c/C  copy contexts
  156.      r/R  force "redraw" of the window
  157.      Esc  quit
  158.  
  159.      
  160. ==> overlay:  draws boxes in the overlay planes with a bouncing ball 
  161.               underneath in the GL window.
  162.         CI, doublebuffer, overlay
  163.       keys:
  164.      b    toggles bell
  165.      Esc  quit
  166.  
  167.  
  168. ++> pixmap:   draws a pixmap
  169.         RGBA or CI, singlebuffer
  170.       cmd line options:
  171.        -c    Run in color index mode
  172.       keys:
  173.      c    
  174.      p    
  175.      w    
  176.      Esc  quit
  177.  
  178.  
  179. ++> pixtest:  takes an image file as input as performs MANY pixel operations 
  180.           via keyboard keys.
  181.         RGB, doublebuffer, depthbuffer, stencilbuffer
  182.       cmd line options:
  183.        pixtest [-s] [-geometry WxH+X+Y] <filename>
  184.        -c    Run in color index mode
  185.        -s       Run in singlebuffer mode [default is doublebuffer]
  186.        -geometry WxH+X+Y   Specify window size and location
  187.       keys:
  188.      i/I  initialize window to white background
  189.      x    increment x size of image 
  190.      X    decrement x size of image 
  191.      y    increment y size of image 
  192.      Y    decrement y size of image 
  193.      LEFTARROW  move entire image left
  194.      RIGHTARROW move entire image right
  195.      UPARROW    move entire image up
  196.      DOWNARROW  move entire image down
  197.      b/B  toggle pixel transfer mode bias with
  198.           GL_RED/GREEN/BLUE_SCALE/BIAS for glPixelTransferf
  199.      m/M  toggle pixel transfer mode mapping with
  200.           GL_MAP_COLOR for glPixelTransferf 
  201.               (from the man page:  each color component is scaled by the size 
  202.            of the corresponding color-to-color map, then replaced by the 
  203.            contents of that map indexed by the scaled component.)
  204.      s/S  toggle glScissor mode to just encompass the image size and then
  205.           back to the full window size
  206.          r/R  change "Test" being performed: DRAW, COPY, or READ pixels, which
  207.           consequently invokes glDrawPixels, glCopyPixels, or glReadPixels
  208.           respectively.
  209.          t/T  change "Type" of data being defined for glDraw/ReadPixels, or 
  210.           glStencilFunc to run thru the cycle GL_UNSIGNED_BYTE, GL_BYTE, 
  211.           GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT,
  212.           GL_BITMAP, GL_UNSIGNED_BYTE.
  213.      f/F  change "Format" of data being defined for a MASS of functions
  214.               to run thru the cycle of GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT,
  215.           GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_RED, GL_GREEN, GL_BLUE,
  216.           GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB.
  217.      a/A  toggle alpha test on/off for glAlphaFunc(GL_GREATER, 0.5).
  218.      e/E  swap bytes from 
  219.         glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_TRUE);
  220.         glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
  221.         glPixelStorei(GL_PACK_SWAP_BYTES, GL_TRUE);
  222.         glPixelStorei(GL_PACK_LSB_FIRST, GL_FALSE);
  223.               to
  224.         glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
  225.         glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE);
  226.         glPixelStorei(GL_PACK_SWAP_BYTES, GL_FALSE);
  227.         glPixelStorei(GL_PACK_LSB_FIRST, GL_TRUE);
  228.      w/W  modify the alignment shift from 1 to 2 to 3 bytes back to 
  229.           default 4-byte alignment with stdout messages of
  230.             (1*), Type: GL_UNSIGNED_BYTE, Format: GL_RGBA
  231.             (2*), Type: GL_UNSIGNED_BYTE, Format: GL_RGBA
  232.             (3*), Type: GL_UNSIGNED_BYTE, Format: GL_RGBA
  233.             Type: GL_UNSIGNED_BYTE, Format: GL_RGBA
  234.      d/D  toggle between immediate or display list modes
  235.      Esc  quit
  236.  
  237.  
  238. ++> readwrite:   perform read/write tests of glDrawPixels
  239.         One should see nothing change with any of these tests if opengl
  240.     is functioning properly (i.e. simply taking a black polygon with an 
  241.     alpha value of zero and adding it to the screen should not change).
  242.         RGBA or CI, singlebuffer or doublebuffer, depthbuffer, stencilbuffer
  243.       cmd line options:
  244.        -c      run in color index mode
  245.        -s      run in singlebuffer mode
  246.        -i      turn direct rendering off--go thru the X server
  247.       keys:
  248.      p/P  pixels test
  249.      b/B  blend test
  250.          d/D  enable/disable dithering
  251.      r/R  redraw    
  252.      Esc  quit
  253.  
  254.  
  255. ++> scube:  draw a lit spining cube and its shadow 
  256.         RGBA && dblbuffer or RGB && sglbuffer or CI && (dblbuffer||snglbuffer),
  257.         depthbuffer
  258.       cmd line options:
  259.        -geometry  window size and location
  260.        -c      toggle color index mode
  261.        -l      toggle lighting
  262.        -f      toggle fog
  263.        -db     toggle double buffering
  264.        -logo   toggle sgi logo for the shadow pattern
  265.        -quads  toggle use of GL_QUADS to draw the checkerboard
  266.       keys:
  267.      l/L  enable/disable lighting
  268.      f/F  enable/disable fog
  269.      1    when fog is enabled, set glFogf(GL_FOG_MODE, GL_LINEAR)
  270.      2    when fog is enabled, set glFogf(GL_FOG_MODE, GL_EXP)
  271.      3    when fog is enabled, set glFogf(GL_FOG_MODE, GL_EXP2)
  272.      Esc  quit
  273.  
  274.  
  275. ==> skeeter:  illustrates overlay/popup plane usage, display lists, two-sided
  276.               lighting, alpha blending transparency.
  277.         RGBA, doublebuffer, alphablending, depthbuffer
  278.       keys:
  279.          LEFTMOUSE  drags the `skeeter' around in the overlay/popup planes
  280.          SPACEBAR   CD drops from the sky
  281.          Esc        quit
  282.  
  283.  
  284. ==> sphere:  draws a wire-framed sphere and exits on any keypress
  285.     RGBA, singlebuffer
  286.       keys:
  287.     KeyBd   quit
  288.  
  289.  
  290. ++> spots:  demonstrate implementation of spotlights "swinging about"
  291.         RGBA, doublebuffer
  292.       cmd line options:
  293.        -geometry Specify size and position WxH+X+Y
  294.        -lm       Toggle lighting(SPECULAR and AMBIENT are/not same
  295.       keys:
  296.          Esc        quit
  297.      
  298.  
  299. ==> tabletogl: "line drawing" tablet demo
  300.     CI, singlebuffer
  301.       keys:
  302.     tablet pen or puck  draws lines as long as stylus is pressed down
  303.     LEFTMOUSE           quit
  304.  
  305.  
  306. ++> tcilight:  test color index lighting
  307.         CI, doublebuffer, depthbuffer
  308.       cmd line options:
  309.        -geometry (Specify size and position:) WxH+X+Y
  310.       keys:
  311.          o/O  toggle between checkboard or cylinder object
  312.          l/L  toggle lighting
  313.          t/T  toggle two-sided lighting
  314.          k/K  toggle local light
  315.          v/V  toggle local viewer
  316.          p/P  toggle spotlight
  317.          n/N  toggle attenuation
  318.          a    decrease ambient color by changing ambient index
  319.          A    increase ambient color by changing ambient index
  320.          d    decrease diffuse color by changing diffuse index
  321.          D    increase diffuse color by changing diffuse index
  322.          s    decrease specular color by changing specular index
  323.          S    increase specular color by changing specular index
  324.          MOUSEBUTTON  when pressed rotate object about its center
  325.          Esc        quit
  326.  
  327.  
  328. ==> tdepth: uses the depth buffer test
  329.     RGBA, singlebuffer, depthbuffer
  330.       keys:
  331.     a/A       toggles aliasing/antialiasing
  332.     s/S       toggles stipple/no stipple
  333.     Esc     quit
  334.  
  335.  
  336. ++> tesstest:  glu tessellator test
  337.       cmd line options:
  338.        -c      run in color index mode
  339.        -s      run in singlebuffer mode
  340.       keys:
  341.      c  create a new contour.  (see note below)
  342.      d  delete a vertex.
  343.      t  tessellate and draw the polygon.
  344.      s  show the tessellation.
  345.      e  draw the polygon in Polymode(GL_LINE) with edge flags.
  346.      LEFTMOUSE   moves an existent vertex
  347.      MIDDLEMOUSE inserts a vertex into a contour
  348.          Esc        quit
  349.       Note : you can create polygon with holes by creating a new
  350.              contour inside the outer contour. pressing c key
  351.              creates vertices for the new countour which can
  352.              be connected by clicking and dragging the middle mouse.
  353.  
  354.  
  355. ++> tfog:  test fog functionality
  356.     RGBA or CI, singlebuffer, depthbuffer
  357.       cmd line options:
  358.        -c    Run in color index mode
  359.       keys:
  360.      a/A       toggles aliasing/antialiasing
  361.      e/E    toggles feedback mode
  362.      f/F    toggles fog mode
  363.      s/S       toggles stipple/no stipple
  364.      t/T    toggles enabling/disabling stencil test
  365.      m/M    toggles smooth shading on/off
  366.          Esc    quit
  367.  
  368.  
  369. ++> tline: line test
  370.     RGBA || CI, singlebuffer || doublebuffer, depthbuffer, stencilbuffer,
  371.       cmd line options:
  372.        -c    color index mode
  373.        -s    single buffer mode
  374.        -geometry  specify window size and location
  375.       keys:
  376.     y/Y     toggle blending
  377.     g/G     toggle rotating "lines as rays of the sun" behind the grid
  378.     q/Q     enable GL_LINE_STIPPLE
  379.     w/W     disable GL_LINE_STIPPLE
  380.     e/E     enable GL_LINE_SMOOTH w/glHint(GL_LINE_SMOOTH_HINT, GL_NICEST)
  381.     r/R      "  GL_LINE_SMOOTH w/glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE)
  382.     t/T     disable GL_LINE_SMOOTH
  383.     a/A     if GL_LINE_SMOOTH enabled (e/E || r/R), 
  384.             increment line width by 0.25 per keypress
  385.         else if GL_LINE_SMOOTH disabled (t/T), 
  386.             increment line width by 1.0 per keypress
  387.     z/Z     if GL_LINE_SMOOTH enabled (e/E || r/R), 
  388.             decrement line width by 0.25 per keypress
  389.         else if GL_LINE_SMOOTH disabled (t/T), 
  390.             decrement line width by 1.0 per keypress
  391.     d/D     toggle dithering
  392.     f/F     toggle line fragmentation
  393.     s/S     toggle flat/smooth shading
  394.     x/X     toggle stenciling on/off
  395.     c/C     toggle depth testing off/on
  396.     v/V     toggle glDepthFunc(GL_ALWAYS) or glDepthFunc(GL_LESS)
  397.     b/B     toggle "Depth writes masked for horizontal lines"
  398.         or "Depth writes not masked"
  399.     Esc    quit
  400.  
  401.  
  402. =+> tlogo: renders the SGI cube logo using a variety of texturing, lighting
  403.        techniques and models.
  404.     RGBA || CI, singlebuffer || doublebuffer, depthbuffer, stencilbuffer,
  405.     RED accumulation buffer
  406.       cmd line options:
  407.        -c    color index mode
  408.        -s    single buffer mode
  409.        -f    choose a new X font name to use
  410.        -geometry  specify window size and location
  411.       keys:
  412.     Esc    quit
  413.     space    anitmation toggle
  414.     ?    show frames/second
  415.         LEFT    rotate to the left
  416.     RIGHT    rotate to the right
  417.     UP      move clipping plane toward viewer
  418.     DOWN    move clipping plane away from viewer
  419.     z    zoom in logo
  420.     Z    zoom out logo 
  421.     1    draw filled polygons
  422.     2       draw only the vertices of the polygons
  423.     3       draw only the outline of the polygons
  424.     p/P     cycle current face mode BACK, FRONT, FRONTANDBACK
  425.     4    if highest level of antialiasing is avaialbe, use it
  426.     5    enable alpha test (function is source alpha, destintation is 1)
  427.     6    enable the depth test
  428.     7    stipple the image
  429.     8    disable the stipple
  430.     9    flat shade the polygons
  431.     0    gouraud shade the polygons
  432.     Q    enable culling of front-and-back facing polygons
  433.     q    disable culling
  434.     w/W    cull the front facing polygons
  435.     e/E    cull the back facing polygons
  436.     r/R    use the cw rule to determine front facing
  437.     t/T    use the ccw rule to determine front facing
  438.     y/Y    change the stippling to least significant bit last
  439.     u/U    change the stippling to least significant bit first
  440.     a/A    use a brick like pattern as the texture image
  441.     s/S    use a black and white checkerboard as the texture image
  442.     d/D    disable texturing
  443.     f/F    change the texturing environment function to decal
  444.     g/G    change the texturing environment function to modulate
  445.     h/H    toggle dithering (default is on)
  446.     l/L    toggle lighting
  447.     k/K     toggle twosided lighting 
  448.     i/I    toggle fog
  449.     j/J    toggle depth testing
  450.     x/X    toggle clip plane on/off
  451.     c/C     toggle capping algorithm
  452.     v/V     toggle jittering (accumulation buffering anti-aliasing)
  453.     b/B     toggle motion blur
  454.     n/N     toggle feedback mode test
  455.     M       increment viewport decimation
  456.     m       decrement viewport decimation
  457.  
  458.  
  459.  
  460. ++> toverlay:  test overlay plane rendering
  461.       cmd line options:
  462.         -nm       just display normal plane window
  463.         -ov       just display overlay plane window
  464.         -m mode   display both windows according to mode:
  465.                    0  overlay is child of normal (default)
  466.                    1  both are children of root
  467.                    2  both are children of a child of root
  468.         -bindov   bind opengl to overlay window first
  469.         -gl       toggle opengl rendering
  470.         -a        toggle animation
  471.  
  472.  
  473. =+> tprim: draws all of the primitives ( from left to right, bottom to top )
  474.        points, lines, line strip, a line loop, bitmaps, triangles, 
  475.        triangle strips, fanned triangles, a rectangle, a polygon, two
  476.        separate quads, and a quad strip.  Draws them using flat shading,
  477.        Gouraud shading and draws them filled or outlined.
  478.     RGBA || CI, singlebuffer
  479.       cmd line options:
  480.        -c    color index mode
  481.       keys:
  482.     f/F    render using flat shading
  483.     s/S    render using smooth shading
  484.     p/P    render polygon in filled mode
  485.     l/L    render polygon in line mode
  486.     c/C     rotates color mask
  487.     b/B     toggle which buffer is currently drawn to: [GL_NONE,GL_FRONT]
  488.     r/R     toggle drawing the next vertex randomly either using
  489.         glVertex2f(x,y), glVertex3f(x,y,0), or glVertex4f(x,y,0,1).
  490.     q/Q     toggle switching to a constrained clipped area or not
  491.     2       toggle switching to the fastest 2D clipping possible
  492.     Esc    quit
  493.  
  494.  
  495. ++> tprim_pup:  resuscitated "iris GL-type" pup menu capability added to the
  496.        tprim prog which draws all of the primitives (left to right, bottom 
  497.        to top ) points, lines, line strip, a line loop, bitmaps, triangles, 
  498.        triangle strips, fanned triangles, a rectangle, a polygon, two
  499.        separate quads, and a quad strip.  Draws them using flat shading,
  500.        Gouraud shading and draws them filled or outlined.
  501.     RGBA || CI, singlebuffer
  502.       cmd line options:
  503.        -c    color index mode
  504.       keys:
  505.     f/F    render using flat shading
  506.     s/S    render using smooth shading
  507.     p/P    render polygon in filled mode
  508.     l/L    render polygon in line mode
  509.     c/C     rotates color mask
  510.     RIGHTMOUSE    invokes "iris GL-type" pop-up menu
  511.     Esc    quit
  512.  
  513.  
  514. ==> tri: render triangles as points, lines or filled and rotate or translate
  515.      with [keypad] arrow keys.
  516.     RGBA, singlebuffer
  517.       keys:
  518.     p/P    render polygon in point mode
  519.     l/L    render polygon in line mode
  520.     f/F    render polygon in fill mode
  521.     LEFT    translate along -x
  522.     RIGHT    translate along +x
  523.     UP    translate along +y
  524.     DOWN    translate along -y
  525.     KeyPadLEFT    rotate around z
  526.     KeyPadRIGHT    rotate around z
  527.     KeyPadUP    rotate around x
  528.     KeyPadDOWN    rotate around x
  529.     Esc        quit
  530.  
  531.  
  532. ==> tri2: render triangles as points, lines or filled inside a larger disk
  533.     with a hole in its center that these triangles get drawn into, and 
  534.     rotate or translate with [keypad] arrow keys.
  535.     RGBA, singlebuffer
  536.       keys:
  537.         p/P     render polygon in point mode
  538.         l/L     render polygon in line mode
  539.         f/F     render polygon in fill mode
  540.         LEFT    translate along -x
  541.         RIGHT   translate along +x
  542.         UP      translate along +y
  543.         DOWN    translate along -y
  544.         KeyPadLEFT      rotate around z
  545.         KeyPadRIGHT     rotate around z
  546.         KeyPadUP        rotate around x
  547.         KeyPadDOWN      rotate around x
  548.         Esc             quit
  549.  
  550.  
  551. ==> ttri: examines the clipping of a triangle using clip planes. 
  552.     RGBA, doublebuffer
  553.       keys:
  554.     LEFT    rotate 1/2 degree around z-axis ccw
  555.     RIGHT    rotate 1/2 degree around z-axis cw
  556.     UP    scale triangle smaller by a factor of .75
  557.     DOWN    scale triangle larger by a factor of 1.5
  558.     p/P     render polygon in point mode
  559.         l/L     render polygon in line mode
  560.         f/F     render polygon in fill mode
  561.     1    render the vertices as a polygon
  562.     2    render the vertices as a line loop
  563.     3    render the vertices as points
  564.     a/A    0 degree rotation around the z axis (default..original position)
  565.     b/B    90 degrees more rotation cw around the z axis
  566.     c/C    180 degrees more rotation cw around the z axis
  567.     d/D     270 degrees more rotation cw around the z axis
  568.     v/V    toggle show vertices (default is true)
  569.     s/S    render with gouraud shading
  570.     t/T    render with flat shading
  571.     h/H    toggle hide bottom (default is true)
  572.     o/O    toggle outlining
  573.     m/M    toggle dithering
  574.     7    toggle culling (default is false)
  575.     8    toggle winding (default is false)
  576.     9    toggle face (default is false - back face is culled)
  577.     q/Q    enable blending
  578.     w/W    disable blending
  579.     Esc    quit
  580.  
  581.  
  582. =+> tvorder:  draw 2-sided lit points, lines or filled polygons--all in quad 
  583.           strip mode--and each time read back some pixels from the middle 
  584.           of the window.
  585.     RGBA, singlebuffer
  586.       cmd line options:
  587.        -u  Render to unmapped window
  588.       keys:
  589.     p/P     render as points
  590.     l/L     render as lines
  591.     f/F     render as filled
  592.     Esc    quit
  593.  
  594.  
  595. =+> twave: wave animation of mesh with control over rendering options
  596.     RGBA, singlebuffer, depthbuffer, stencilbuffer ||
  597.     RGBA, doublebuffer, depthbuffer, stencilbuffer ||
  598.     CI, singlebuffer, depthbuffer, stencilbuffer   ||
  599.     CI, doublebuffer, depthbuffer, stencilbuffer   ||
  600.       cmd line options:
  601.        twave [-g width height] [-f frames] [-c] [-s] [-b checker size]
  602.              [-h height] [-geometry WxH+X+Y] [-a]
  603.        -g    Specify grid size  (default is 10 by 10)
  604.        -f    Specify number of frames in a full cycle (default is 10)
  605.        -c    Run in color index mode
  606.        -s    Run in single buffered mode
  607.        -b    Specify size of checker on checker board (default is 2)
  608.        -h    Specify the height of the wave (default is 0.2)
  609.        -a       Don't start off animating
  610.        -geometry  Specify window size and location
  611.       keys:
  612.     c/C    cycle texturing modes
  613.     s/S    toggle flat/smooth shading
  614.     l/L    toggle lighting on/off
  615.     d/D    toggle depth testing on/off
  616.     o/O     toggle overstrike mode, use of stencil
  617.     f/F     toggle fog (currently not working)
  618.     space    halt motion
  619.     n/N    enable motion
  620.     a/A    enable spinning
  621.     Esc     quit
  622.  
  623.  
  624. ++> wind2:  simple multi-context abuse program:  drawing with one context 
  625.         into two windows
  626.     RGBA || CI, singlebuffer || doublebuffer
  627.       cmd line options:
  628.        -c    color index mode
  629.        -s    single buffer mode
  630.       keys:
  631.     Esc    quit
  632.  
  633.  
  634. ++> wind3:  simple multi-context abuse program:  drawing with two contexts
  635.         into three windows
  636.     RGBA || CI, singlebuffer || doublebuffer
  637.       cmd line options:
  638.        -c    color index mode
  639.        -s    single buffer mode
  640.       keys:
  641.     Esc    quit
  642.  
  643.  
  644. ++> xswap:  test buffer swapping mixing X and OpenGL
  645.     RGBA || CI, doublebuffer
  646.       cmd line options:
  647.        -c    color index mode
  648.       keys:
  649.     f       set the draw buffer to be GL_FRONT
  650.     b       set the draw buffer to be GL_BACK
  651.     g       toggle drawing the font in openGL (glCallLists) or not 
  652.     x       toggle drawing the font in X (DrawXFont) or not
  653.         r       force a "REDRAW" event of the entire window
  654.     s       swap the colors of the FRONT and BACK buffers
  655.     Esc    quit
  656.  
  657.  
  658. ==> zrgb:  depthbuffered, intersecting polygons movable with mouse
  659.        (openGL version of ~4Dgifts/examples/grafix/zrgb.c)
  660.     RGBA, doublebuffer, depthbuffer
  661.       keys:
  662.     LEFTMOUSE    rotate polygons
  663.     Esc    quit
  664.  
  665.  
  666. ++> zrgb_pup:  resuscitated "iris GL-type" pup menu capability added to the
  667.        the zrgb.c prog including  depthbuffered, intersecting polygons 
  668.        movable with mouse functionality.
  669.        (openGL version of ~4Dgifts/examples/grafix/zrgbmenu.c)
  670.     RGBA, doublebuffer, depthbuffer
  671.       keys:
  672.     LEFTMOUSE    rotate polygons
  673.     RIGHTMOUSE    invokes "iris GL-type" pop-up menu
  674.     Esc    quit
  675.