From: Ari H. <ahe...@an...> - 2001-09-28 19:13:38
|
On Fri, Sep 28, 2001 at 08:53:39PM +0200, Konrad Piwowarczyk wrote: > - I would like to have a tkWidget to display visualpython animations - > is it possible to develop such widget? > I think the architecture of vpython is not suitable for it - if I am > wrong, please correct me. You're correct. You can use Tk widgets in conjunction with VPython, but currently there is no VPython drawing area that lives inside a Tk widget. Right now you can basically get a VPython window and a separate Tk window. In theory this is correctable -- currently we use GtkGLArea on Unix-based systems, which is a GL context wrapped in a Gtk widget. In theory if a similar GL widget for Tk exists, you could probably write a new VPython context to support it without too much difficulty. In general I think we've found the current level of interaction to be sufficient. Look through the demos and you'll see some examples of use of VPython constructs for basic UI elements (colorsliders.py), which may be sufficient for your purposes. > - Wouldn`t it be easier to use PyOpenGl library instead of interacting > with OpenGl directly. The software seems to be quite usefull since the > version 2.0 appeared (http://pyopengl.sourceforge.net/) We used to use PyOpenGL when we were developing VPython -- it was easier for prototyping. The current setup is much faster, however, which is why Scherer rewrote VPython in its current form after we had hashed out the basic interfaces we wanted. Ari |