From: Jonathan B. <jbr...@ea...> - 2004-09-09 17:33:28
|
On Thu, 2004-09-09 at 13:04, Fionn Behrens wrote: > Hi all, > > > I have asked earlier, I do it again. We have a project here that needs 3d > output. the UI itself ist done in python-gtk. > We fail to manage starting vpython out of our gtk application. First the > two mainloops collided, so people told us to use python-gtk2 and threads. > > So we switched the Ui to python-gtk2 and use threads. Similar to the > tk-demo thats coming with python-visual, we start python-visual in its own > thread. > The good news: no more mainloop clashing. The bad news: It segfaults > immediately, leaving loads of messages on the screen that look like this: Unfortunately, running Visual in a separate thread isn't enough - to be totally safe right now, VPython has to be run in a separate process. The Gtk process would have to communicate with the Visual process using a pipe, socket, or some other IPC mechanism. However, there is hope. Some significant work is being done to separate the OpenGL management from the windowing system management, such that you will be able to render a VPython scene into a toolkit-specific OpenGL window. The initial release of that functionality will include a PyGtkGLext-based widget (gtkglext.sourceforge.net), since I am familiar with that package. It will also include the capability to do the same for other toolkits in pure Python. -Jonathan |