[vtk-developers] VTK + GTK + Mac OSX rendering bugs [SOLVED]

Valerie Coffman valerie.coffman at nist.gov
Thu Mar 11 15:25:40 EST 2010

Dear VTK Developers,

Some time ago, I wrote about rendering bugs that occur when using the 
GtkGLExtVTKRenderWindow.py example in the VTK source tree. 

Before that, I wrote about how gtkglext is unnecessary 
http://www.vtk.org/pipermail/vtkusers/2008-April/094892.html. I noticed 
that the changes I suggested were incorporated into the source code in 
the script noglext.py. (It's customary to give people credit when you 
distribute code based on their suggestions.)

I have finally gotten to the heart of the matter. Essentially, 
GtkGLExtVTKRenderWindow and the similar functions work by accident and 
should probably be removed from the source tree since they are not 
robust. More specifically, gtkglext creates gl objects and ties them to 
gtk objects by passing in the colormap and visual info. But VTK creates 
new gl objects afterwards that do not get properly tied to the gtk 
objects -- they aren't passed the right colormap. That the colormap is 
correct on some systems is a coincidence. Removing gtkglext has no 
effect on some platforms because what it does is effectively overridden 
by the VTK code. Furthermore, as far as I can tell, it's not possible to 
create something like GtkGLExtVTKRenderWindow.py because not all the 
necessary functions have python wrappers.

Our solution has been to write our own class in C++ that has a 
vtkXOpenGLRenderWindow and a GtkWidget as members. Then we tie them 
together using the VTK and Gtk API's directly, without gtkglext. The 
question is, whether something should be incorporated into the VTK 
source and how. Is there an interest in this?


More information about the vtk-developers mailing list