OpenGL has been the most widespread 2D and 3D graphics library almost since its original release in 1992. It is available on all Unix systems, and it is shipped standard on MacOS and Windows systems. It is a ubiquitous, well documented tool for 3D graphic development, just the kind of tool a Python developer might want to take advantage of. PyOpenGL helps you do that.
PyOpenGL version 1.5.6 was recently announced. PyOpenGL provides Python wrappers to some of the OpenGL graphics library. It has been over two years since the original 1.5.5 release. The biggest change between the two releases is that it has new developers and is now hosted on SourceForge. The tool itself is largely unchanged. The OpenGL wrappers in PyOpenGL are still handwritten. This allows for greater control, but it is also a slow process. This partially explains why the entire OpenGL toolkit has not yet been wrapped. PyOpenGL developer Mike Fletcher is looking into using SWIG to accelerate the process of adding new functions. There is some question, though, about how to get function definitions that are not themselves proprietary and non-redistributable. SWIG transforms function definitions in header files to generate basic wrappers. OpenGL may be an open standard but it is not itself open source.
Complete or not, PyOpenGL is usable now and, with renewed interest from developers, likely to improve. The demonstration examples are a great place to start in exploring this tool.
Stephen Figgins administrates Linux servers for Sunflower Broadband, a cable company.
Read more Python News columns.
Discuss this article in the O'Reilly Network Python Forum.
Return to the Python DevCenter.
Copyright © 2009 O'Reilly Media, Inc.