Announcing iGLU: OpenGL Utility Library for iPhone OS
Recently, while working on an OpenGL-based iPhone application, I found that I needed to use tessellation to transform some complex polygons into triangles. The OpenGL Utility Library (GLU) supports tessellation (via GLUtesselator). Unfortunately, iPhone OS doesn't include a GLU implementation.
After failing to find a standalone tessellation library that met my needs, I decided to take a look at the GLU implementation included with Mesa. The Mesa GLU is based on code from SGI's OpenGL Sample Implementation, and it turned out to be relatively easy to extract it from MesaLib. After some minor changes to the source and Makefiles, I succeeded in producing libGLU.a's for both the iPhone simulator and the device.
Since this may be of interest to other iPhone developers, I've packaged it up and released it as iGLU. Note that several GLU features (specifically, mipmapping, quadrics, and NURBS) are missing from iGLU, as their implementations depend on functionality that is absent in OpenGL ES 1.1. If someone wants to provide ES-compatible implementations of these features, I'd be happy to include them in iGLU, but I have neither the time nor the inclination to write them myself.
I hope some folks find this package useful. Please direct any questions, comments, or bug reports to the iphone-glu group.
Tags: iglu, iphone, opengl
Sun, 28 Sep 2008 22:57 UTC
Projects
Here's a list of free software projects I've written or worked on:
- iGLU
- OpenGL Utility Library (GLU) for iPhone OS
- multitask
- Cooperative multitasking and asynchronous I/O using Python generators
- pybonjour
- Pure-Python interface to Apple Bonjour and compatible DNS-SD libraries
- Bonjour
- I wrote some patches to support Windows Mobile/CE.
- i2py
- Convert IDL to Python
- PySL
- Use S-Lang from Python (and vice versa)
- SLglade
- S-Lang bindings for libglade
Tags: apple, bonjour, iphone, opengl, python, s-lang
Sat, 13 Sep 2008 14:53 UTC
OpenGL SuperBible Examples Using pyglet
Some recent experimentation with pyglet has gotten me interested in learning OpenGL. Over the weekend, I picked up the OpenGL SuperBible, which, despite its imposing size (over 1200 pages), seems to provide a very nice tutorial introduction.
The book includes many example programs, which are written in C++ and use the GLUT library. Rather than suffering through all the pain of building and debugging C++ programs, I've been translating them into Python using pyglet. Because pyglet provides a very lightweight wrapper around the OpenGL C API, this is mostly straightforward. However, the conversion between GLUT and pyglet is not always obvious (to my beginner's eyes, anyway).
In case others find my converted examples useful, I've made them available as a Bazaar branch. At the moment, there are only a couple scripts in that directory, but hopefully it will fill up quickly as I work through the text.