How to setup pyOpenGL3.0.a6 for window xp?

Richard Jones richardjones at optushome.com.au
Sun Aug 19 17:59:10 EDT 2007


Gary Herron wrote:
> Jason wrote:
>> On Aug 17, 6:42 pm, Carl Banks <pavlovevide... at gmail.com> wrote:
>>   
>>> Windows comes with OpenGL libraries.  However, before you can use
>>> OpenGL you'll need a package that can provide an OpenGL context, which
>>> PyOpenGL doesn't do (easily).
>>>
>>> PyGame is the typical choice for most uses.  If all you need is a
>>> simple window to draw on, this is the package you want.
>>>     
> If you want an *easy* way to create an OpenGL window and context, you
> could try FLTK, and it's Python wrapper PyFLTK.

The simplest method by far uses pyglet from http://www.pyglet.org/

    from pyglet import window
    w = window.Window(200, 200)
    while not w.has_exit:
        w.dispatch_events()
        ... do OpenGL stuff

pyglet has no compilation and no dependencies and works on Linux, OS X and
Windows. You can use PyOpenGL with it just fine, or use its own gl layer
(which is intentionally less pythonic)


     Richard




More information about the Python-list mailing list