SWIG OpenGL example

This example wraps the OpenGL library using SWIG.  You may have
to do abit of hacking to get it to work however.   I have used this
under both SGI OpenGL and Mesa 1.2.8.   However, getting to compile
was somewhat non-trivial so you're going to have to mess around
with it.  Good luck!

How to build
============

1.   FTP to sgigate.sgi.com and retrieve the file :

        pub/opengl/opengl.tar.Z
 
     This file contains the examples from the OpenGL
     Programming Guide and used by this SWIG module for
     examples.   Untarring the file should create a
     subdirectory called "book".


2.   Do the following to build the example code:

        cd book
        cd libtk
        xmkmf
        make
        cd ../libaux
        xmkmf
        make
        cd ../..

3.  Now in this directory, type a "make all" to build
    both a Tcl and Python version.  You might need to
    edit the makefile abit.

Miscellaneous Notes
===================

1.  This example builds a new version of SWIG for Tcl processing.
The file gl_tcl.h and gl_tcl.cxx contain code for a SWIG module.
Take a look at them if you want to see how they work (unfortunately
they're a little messy).   This new version of SWIG adds
constants into a hash table---allowing them to be accessed in Tcl
without the $.   So, you can type commands like

    glClear GL_COLOR_BUFFER_BIT

instead of
	
    glClear $GL_COLOR_BUFFER_BIT

	
2.  The Examples directory has both Tcl and Python examples.  The
Python examples are abit more developed since they were adapted
directory from some C code in the OpenGL examples download.  To
use the Python examples, you may want to fix the symbolic link
in the Examples directory to point to your local python interpreter.

3.  The special function newfv4(w,x,y,z) is used to create a 
small 4 element array.   You'll see it quite alot in the example
scripts.

4.  Post no bills.   This whole example was cooked up in an
afternoon so there are many things that could be improved if 
I had more time....

    

