PyOpenGL Documentation

General Background

OpenGL under Python is largely the same as OpenGL under most other languages, so you can use much of the documentation you'll find around the Internet, or in your local bookstore.  This page primarily provides links to PyOpenGL-specific documentation.  Users of OpenGLContext should also see the OpenGLContext documentation page.


These documents tend to focus on the particular APIs and details of operation for PyOpenGL (or OpenGL in general).


There are a large number of very good books on OpenGL available. Many of these books cover "legacy" OpenGL, rather than the shader/buffer/texture model of OpenGL 3.0. Still, they provide a good grounding that allows you to learn the basics of OpenGL.

OpenGL Programming Guide: (The Red Book)

Older versions of the official OpenGL Programming Guide, a.k.a "The Red Book" are available online in various places (version 2.0 covers OpenGL 1.1). If you are serious about learning OpenGL, the newer versions of the Red Book, (v3.0) is likely on the shelves of your local bookstore, and is quite readable.

You'll find versions of some of the Red Book tutorial code for Python included in the PyOpenGL-Demo/redbook directory of the PyOpenGL-Demo distribution. These versions are very close to the original source code. The OpenGLContext tests directory also has four of the tutorials converted, "alpha", "alpha3D", "surface" and "trim".

Addison-Wesley Pub Co; ISBN: 0201604582 ; 3rd edition (August 6, 1999)

OpenGL Shading Language: (The Orange Book)

This book serves as a good introduction to shaders. The shaders described cover the gamut from the simplest 1-line shaders through code to emulate legacy operation to non-realistic shading to caustics and the like. You will generally have to adapt any code you take from here to work with your real-world scenes, but the book offers a strong grounding.

Addison-Wesley Pub Co: ISBN: 978-0-321-33489-3; 2nd edition

OpenGL Super-Bible

This book is an all-round introduction, working up from OpenGL 1.0 era operations all the way to OpenGL 2.x era behaviours. Coverage of newer features tends to be somewhat sketchy, but coverage of older features is extensive. It is notable mainly for being somewhat up-to-date and having exhaustive coverage of what it covers. The book also makes a great anchor for your average supertanker.

Sams Pub: ISBN 0-672-32601-9; 3rd edition

NeHe Tutorials

When people think of an "OpenGL tutorial", many will immediately think of the NeHe tutorials by Jeff Molofee, available at these tutorials range from the very simple (create an OpenGL window) through the advanced (particle systems, loading scenes from various formats, displaying video textures, text, morphing, multi-texturing). The older tutorials tend to be legacy-mode operations, so you should keep in mind that they are describing old ways of working as you learn with them.

The NeHe tutorials are so popular that there are multiple Python translations available:

PyOpenGL-Specific Tutorials

If you have a PyOpenGL-specific tutorial you'd like added to this area, please post to the PyOpenGL-user's mailing list.

Resources and Links

Here are some starting points for further exploration.


Bug reports and feature requests should use the SourceForge project page. General questions, including most programming questions are best answered on the PyOpenGL mailing list. Questions regarding project administration, or development can use the PyOpenGL-devel mailing list.