Table of Contents

PyOpenGL + PyGame

These are notes from a graphics course that I taught many years ago. Hopefully, they will be useful for someone. They focus on Python 2.7, which is now deprecated. However, it is likely that some of this will still translate to Python 3.


For the remainder of these notes, we will be working with PyOpenGL.

Installation

We assume that you currently have a working installation of Python 2.7 and the ability to install packages via pip or easy_install. You will need to install the following packages in the order they are listed:

NumPy
PyGame
PyOpenGL
PyOpenGL_accelerate
PyDispatcher
PyVRML97
OpenGLContext

Lecture Companions

PyOpenGL Primer
PyGame Mouse Events
Getting Started in 3D
Patch for using OpenGLContext with Python 3.6+
Old-School Lighting Example
Stanford Polygon Format
Texture Mapping
Vertex Buffer Objects
Getting Started with Shaders
More Shaders
Example using Uniforms