[vtkusers] Re: [vtk-developers] Gtk/wx and VTK - more issues: need help!

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Sat Mar 10 16:22:55 EST 2001


hi,

>>>>> "David" == David Gobbi <dgobbi at irus.rri.on.ca> writes:

    David> This is probably because the event handler in
    David> vtkRenderWindowInteractor and the one in Gtk aren't
    David> cooperating with one another.  There is a special
    David> vtkXRenderWindowTclInteractor that cooperates with Tk, so
    David> I'm guessing that if you wanted to use an Interactor with
    David> Gtk you would need a special vtkXRenderWindowGtkInteractor.
    David> My advice would be to do all the event handling (including
    David> the redraws) through Gtk, and not use the Interactor at
    David> all.

Thanks, David, for the advice.

However, I thought I'd mention that the wxVTKWindow c++ class simply
derives from vtkRenderWindowInteractor and works.  I still suspect
that this problem with Gtk+ vtkRenderWindowInteractor arises because
somehow Render() is called before the Gtk Widget is realized.  In the
wxVTKWindow code the RenderWindow is created only when the widgets are
realized.  Anyway, I will follow your advice because it isnt worth the
effort bending over backwards to ensure that things are called in
proper order.  After all embeding a vtkRenderWindow works perfectly
well.  I was just lazy to implement the interaction/picking etc.

So, when I get the time I will modify some of the vtkTkRenderWidget
code and stick it into my GtkVTK hack (I still dont know enough Gtk to
call my hack "code" :).  Of course, I'd be glad to leave this task to
some pyGtk guru on the list who wants to have a shot. :)


prabhu




More information about the vtkusers mailing list