By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,276 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,276 IT Pros & Developers. It's quick & easy.

Using PyQT and OpenGL

P: n/a

Hi folks,

Although the PyQt documentation indicates that QGLWidget & friends have
been ported to Python for the PyQt bindings, I'm not entirely sure what's
necessary to make the normal OpenGL/GLUT interface available.

Does PyQt work okay with PyOpenGL? Or is a more complicated workaround
needed?

If anyone has experience with working with Python/Qt/OpenGL and can offer
any advice I'd much appreciate it.

Thanks,

Peter

--
Quake II build tools maintainer http://tinyurl.com/fkldd

v2sw6YShw7$ln5pr6ck3ma8u6/8Lw3+2m0l7Ci6e4+8t4Eb8Aen5+6g6Pa2Xs5MSr5p4
hackerkey.com

Jul 26 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Peter TB Brett wrote:
Although the PyQt documentation indicates that QGLWidget & friends have
been ported to Python for the PyQt bindings, I'm not entirely sure what's
necessary to make the normal OpenGL/GLUT interface available.

Does PyQt work okay with PyOpenGL? Or is a more complicated workaround
needed?
PyQt works fine with PyOpenGL. The QtOpenGL module only provides
widgets and other features for use with an existing OpenGL library.
It doesn't provide or expose its own OpenGL implementation.

For example, you would typically subclass QGLWidget and reimplement
the initializeGL(), paintGL() and resizeGL() methods to handle
initialization, painting (with PyOpenGL calls) and updates to the
transformation matrices. Since QGLWidget is itself a subclass of
QWidget, you can use standard PyQt code to handle user input
and other non-OpenGL tasks.
If anyone has experience with working with Python/Qt/OpenGL and can offer
any advice I'd much appreciate it.
Take a look at the examples provided in the PyQt distribution to get
started.

Good luck!

David

Jul 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.