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

M

math2life

Hi,
I've already download the pyOpenGL3..0.a6 for python2.4 and installed
python2.4,

Is it necessary to install OpenGL? And if need, which version of
OpenGL should be
installed?

Thanks!
 
C

Carl Banks

Hi,
I've already download the pyOpenGL3..0.a6 for python2.4 and installed
python2.4,

Is it necessary to install OpenGL? And if need, which version of
OpenGL should be
installed?

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.

However, it doesn't (easily) work with common GUIs like GTK and Wx.
If you want to use use OpenGL in a GUI app, then you'll want to find
an "OpenGL canvas widget" for that GUI.


Carl Banks
 
M

math2life

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.

However, it doesn't (easily) work with common GUIs like GTK and Wx.
If you want to use use OpenGL in a GUI app, then you'll want to find
an "OpenGL canvas widget" for that GUI.

Carl Banks

ye!I made it.
The OpenGL context should be pre-installed.

I want PyOpenGL can work with Wx, but it is good idea to start with
PyGame for the newbie to OpenGL.

Thank you , Carl
 
J

Jason

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.

However, it doesn't (easily) work with common GUIs like GTK and Wx.
If you want to use use OpenGL in a GUI app, then you'll want to find
an "OpenGL canvas widget" for that GUI.

Carl Banks

Sorry Carl, but I'm a bit confused with your third paragraph. Do you
mean that PyGame doesn't work easily with Wx/GTK, or that OpenGL
doesn't work easily with Wx/GTK?

If it's the second, then I must disagree. wxPython comes with an
OpenGL widget in the "wx.glcanvas" module. The widget only requires
PyOpenGL. The wxPython Demo shows how to set up and program the
widget quite easily. Another example is at: "http://
aspn.activestate.com/ASPN/Cookbook/Python/Recipe/325392".

Unfortunately, I don't have much experience with PyGTK. Their FAQ
does indicate that you need an extension to add OpenGL support.

--Jason
 
G

Gary Herron

If you want an *easy* way to create an OpenGL window and context, you
could try FLTK, and it's Python wrapper PyFLTK. It's a simple (nice,
very small, well featured and consistent) widget toolkit with OpenGL
support. Once the window is open, PyOpenGL (versions 2xx or 3xx) work
perfectly on the window.

See http://www.fltk.org/

Gary Herron
 
R

Richard Jones

Gary said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,434
Messages
2,571,688
Members
48,796
Latest member
Greg L.

Latest Threads

Top