The underlying "pgltGeom" library comes from one .c and one .h file:
gcc -c pgltGeom.c -o pgltGeom.o gcc -dynamiclib -o libpgltGeom.dylib pgltGeom.o
I used ctypeslib to automatically generate a ctypes wrapper around the shared library, then did some hand-editing:
I wrote a stand-alone C program to demonstrate use of the library:
gcc -framework GLUT -framework OpenGL -framework Cocoa \ -L. -lpgltGeom pgltDemo.c -o pgltDemoThe program draws some curving tube geometry in two different ways, without vertex arrays on a yellow background, and with vertex arrays on a white background. For example:
Here's a very literal python version of the same C program, which works okay to draw the geometry without vertex arrays, but has problems when trying to use vertex arrays.