PyOpenGL Logo

PyOpenGL 3.x

The Python OpenGL Binding

About PyOpenGL

PyOpenGL is the most common cross platform Python binding to OpenGL and related APIs. The binding is created using the standard ctypes library, and is provided under an extremely liberal BSD-style Open-Source license.

PyOpenGL 3.0.2 includes support for:

  • OpenGL v1.1 through 4.3
  • GLU
  • GLUT v3.7
  • FreeGLUT
  • GLE 3
  • hundreds of OpenGL extensions

PyOpenGL is interoperable with a large number of external GUI libraries for Python including (but not limited to):

PyOpenGL 3.0.2 runs on:

  • Python 3.2+ (experimental)
  • Python 2.7 (recommended)
  • Python 2.6 (for compatibility with older software and systems)
  • Python 2.5 (this is the last release to support Python 2.5)

Sub-Packages

The PyOpenGL project has two sub-projects, the core library, PyOpenGL (known as the pyopengl module in bzr, and the OpenGL package when installed in Python), and a teaching and testing library, OpenGLContext built on top of the core.  You do not need OpenGLContext to work with PyOpenGL, it provides sample code for many common operations, but it is not part of the core library.

Documentation

The documentation collection provides reference documentation, support and feedback information and pointers to more in-depth documentation.

Downloading and Installation

The easiest way to install PyOpenGL is using pip

$ pip install PyOpenGL PyOpenGL_accelerate

You can also manually download PyOpenGL from PyPI and run python setup.py

If those fail, the detailed installation instructions are available.

Source Code

You can work with latest version of PyOpenGL using the bzr distributed source code control tool on the LaunchPad code-hosting platform:

bzr branch lp:pyopengl
bzr branch lp:pyopengl-demo

Contributions and patches are very welcome.  You can either request a merge via LaunchPad or send a patch-set via email using "bzr send" to mcfletch@vrplumber.com.

Support

Bugs and general questions are best reported and answered on the PyOpenGL mailing list.  The list is fairly low-traffic.

OpenGL.org is the official home of OpenGL on the Web.

Other Libraries


There are quite a few 3D-related libraries available for use with Python, many of them either based on, or extensible with PyOpenGL.  PyOpenGL's author collects pointers to them on his site.  There is another commonly used binding of OpenGL for Python which is part of the Pyglet game development environment.

A SourceForge Open-Source Project