ANN: OpenGL, GLU, and GLUT for Python

gb at cs.unc.edu gb at cs.unc.edu
Thu Aug 1 16:39:09 CEST 2002


I have written a *really* simple wrapper for OpenGL, GLU, and GLUT
using SWIG. You can download it at

http://www.cs.unc.edu/~gb/GLforPython-1.0.tar.gz. 

You might well ask why I would write my own when we already have
PyOpenGL? The simple answer is the PyOpenGL distribution was too
complicated for my simple brain. A colleague and I were trying to get
it to work on Mac OS X (which I understand several people have
successfully done) and we just couldn't make it work. I was
overwhelmed by the 580 files in the distribution.

So, I wrote these SWIG interface files over a weekend. There are only
6 files in this distribution and one of those is a trivial test
script. Not *all* of the functions in the libraries are wrapped. I did
lots of them but quit once I got the subset that I needed. I claim
that implementing most of the remainder will just be a matter of
mimicking what is already here. I'd be happy to work with anyone
interested in adding more functions.

This is known to work on Windows 2000, Mac OS X, and Red Hat
Linux. More details are in the comments at the beginning of the SWIG
interface files.

I place no restrictions on the use or distribution of this code. There
may be restrictions on the .h files that I derived these .i files
from.

To build it just unpack the archive and type

python setup.py build

Then with necessary permissions, type

python setup.py install

gb



More information about the Python-list mailing list