Advice needed: large OpenGL + Widgets Project for Molecular Graphics
Mike C. Fletcher
mcfletch at rogers.com
Tue Mar 16 11:09:49 CET 2004
Rick Muller wrote:
> Advantages: Least amount of modules to install.
> Disadvantages: Tk is ugly. Tk is old. Tk doesn't look good on
> Macintosh/Aqua. Togl is either dead or dying?
Togl is pretty much history. I'll likely fix the installer one last
time for the next bug-fix release (2.0.2) and then drop the thing. I've
been looking for someone who uses Tkinter+Togl to champion maintenance
of the thing for years and never found anyone interested enough to
bother. I'm not a huge fan of Tkinter either, for that matter.
> Advantages: Seems to be a healthy, integrated solution to putting
> an OpenGL window inside of a widget. Pretty widgets, and lots of
> fancy features.
> Disadvantages: The OpenGL install still crashed under Windows. A
> widget set that not many people use? Also requires the most amount
> of code rewrite, although if it's the best option it isn't a
I'm surprised. I install and run wxPython + PyOpenGL all the time on
Windows (which is my primary dev environment for PyOpenGL). wxPython
has a full OpenGLContext Context, so at the very least the wxPython
widget is getting a lot of exercising. It's also the framework I'm
using to rough out an interactive graphics system similar to that seen
in VPython (though using wxPython and the OpenGLContext scenegraph
engine (see the browser sub-project)). That's basically a VR world
showing on one side of a splitter opposite a wxPython-based Python shell.
If you're seeing crashes under this combination, please file bug reports
on the project page. I'd expect to see crashes in bad combinations of
PyOpenGL and Numarray/Numpy (the binary 2.0.1.07 requires Numarray, all
earlier binaries require Numpy)...
BTW, someone else suggested using VPython. It's basically it's own 3D
scenegraph-level API with a very simple interface. Not a lot of
mechanisms exposed, but it might have enough to get your job done. I
believe it only runs under Tkinter.
>5. Other ideas:
> It is a sign of my own desperation that I'm even considering things
> like writing a canvas widget that can draw balls and sticks, and
> then just doing the matrix algebra in NumPy, rather than using
For balls and sticks this is a pretty trivial task. 4th year comp-sci
students are made to do this (well, a lot more) for creating ray-trace
renderers in their computer graphics courses. However, being able to
load everything into the hardware buffers of a video card is pretty hard
to beat as a performance path.
>Thanks in advance for any help or sympathy that people can offer.
Hmm, sympathy? You get to work on graphics and you want sympathy? Some
of us would *kill* to have the time to work on graphics ;) .
Mike C. Fletcher
Designer, VR Plumber, Coder
More information about the Python-list