Sat, 08 Jan 2005

Fedora Core 3 and PyOpenGL 2.0 Installation

Screenshot of pyGears window

According to the website, PyOpenGL "is a cross platform Python binding to OpenGL and related APIs." Since I have started playing around a bit with Python this new year I was curious to see how the language could be used for graphics, and specifically, 3D graphic development. In the past I have tinkered with OpenGL a bit, however, it has usually been by means of programming under C and using SDL as the library.

I was a little daunted after viewing the installation page and seeing what needed to be done, however, being new to Python I was pleasantly suprised to find that most of the OpenGLContext dependencies could simply being installed by entering,

python setup.py install

after untarring the archives into a temporary directory. It doesn't get much easier than that.

Pay close attention to the requirement for GLUT 3.7. On Fedora Core 3 RedHat has taken to installing freeglut, which is a completely open sourced alternative to the OpenGL Utility Toolkit (GLUT). In theory, it should be a fairly complete drop-in replacement for GLUT, however, I could not get PyOpenGL to install with it on my system. I read a few posts mostly pertaining to Fedora Core 2 and similar issues and with the latest alpha release of PyOpenGL-2.0.2.01.tar.gz the author has attempted to have the installation procedure detect the presence of freeglut, however, I was not able to get it to work.

In the end I uninstalled freeglut, downloaded and installed GLUT 3.7 from source and then reinstalled the latest alpha release of PyOpenGL. After receiving no further errors, I went into "/usr/lib/python2.3/site-packages/OpenGL/Demo/GLUT" and typed in,

python gears.py

and voila! I had hardware accelerated rotating gears doing about 1400+ fps on my Pentium III 866.



posted: 00:54 | 0 comments | tags: , , ,


Comments

Name:


E-mail:


URL:


Comment:


© 2008 PlatosCave.net