Huge thanks for this, built fine on Arch Linux 64bit with two caveats, changed the CC and LD from 'gcc-4.7' to 'gcc' (likely a better default?) and also add -lGL to the LDFLAGS for it to build.
Skimming through the source everything looks very nice and tidy, I wish my spare-time code looked like this