Getting setup with PyOpenGL

From Tech Artists Wiki

Jump to: navigation, search

Written by Jason Hayes - Technical Art Director - Volition

Contents

[edit] Overview

In this tutorial, I will explain how to get setup with PyOpenGL.

[edit] What is PyOpenGL?

PyOpenGL is an open-source Python binding layer to OpenGL. In order to use OpenGL with Python, you must download and install this library.

[edit] Installing PyOpenGL

The easiest and quickest way to get PyOpenGL installed is to use EasyInstall. This package provides an easy and automatic method of getting Python packages installed. I've tried installing PyOpenGL manually and basically gave up. EasyInstall will do everything for you.

[edit] Step 1.

Download this Python script and run it. The script is called ez_setup.py and will automatically install an executable named easy_install.exe into your \Python25\scripts\ directory.

[edit] Step 2.

Open up a command prompt window. Change your directory to \Python25\scripts\ and then type in:

easy_install PyOpenGL


You should now see PyOpenGL being downloaded and installed onto your machine. Assuming everything went smoothly, you are ready to begin using OpenGL with Python.


For more information about EasyInstall, visit this site.

For more information about PyOpenGL, visit this site.

Personal tools