[vtkusers] RE: [wxPython] VTK + wxPython flicker issue on Linux/GTK.
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Thu Mar 8 01:25:01 EST 2001
hi,
Sorry, the last mail was incomplete - I accidentally sent it out when
I didnt intend sending it at all! Terribly sorry.
>>>>> "David" == David D Marshall <gte552m at prism.gatech.edu> writes:
David> As for Prabhu's original flicker question, perhaps you
David> could take a look at the wxVTKRenderwindow code mentioned
David> above and back-port it to python. I am not skilled in
David> this, but from what I remember of the wxPython-VTK code it
David> was similar to the above c++ class wxVTKWindow.
I just looked at your package. However, my knowledge of GTK and wx is
not good enough to help me here. Here is what i understand looking at
the vtk.py from wxPython and wxVTKWindow.cpp that ships with Brian's
and your wxVTK package.
(1) You are right - both of them are pretty similar in what they
try to do. One difference with wxPython.vtk is that there is no
multiple inheritance and a renderwindow (not a
renderwindowinteractor) is stored as an instance variable in the
Python class. Would this make a big difference?
(2) I noticed that you set the WindowId of the RenderWindow etc
when doing an OnPaint. The vtk.py does this when the window is
realized. There is another key difference on how the WindowId is
set. The wxVTKWindow class does something funny for the
__WXGTK__ case. You use a GtkPizza (I have no clue what that is)
and set the RenderWindow's WindowId and DisplayID by looking at
the pizza windows bin_window and getting its xwindow and
xdisplay. The wxPython code cannot do something like this since
it will not have access to Gtk/Gdk stuff. Instead of doing this
the wxPython.vtk code merely does this:
hdl = seld.GetHandle()
self.renderWindow.SetWindowInfo(str(hdl))
Does this matter? Or do you have to do it someother way?
So my questions are:
(1) Does it matter that in wxPython we store a RenderWindow
instead of a RenderWindowInteractor as you do?
(2) Does it matter if you set the WindowId etc. in OnPaint or on
the OnCreateWindow?
(3) Do you have to do that GtkPizza thing to get things working
with wxGtk? Is there another way? Can it be done under Python??
My guess is that item (3) is the most crucial. Rather than my poking
at this stuff in a random fashion without knowing what I am doing I'd
appreciate it if someone who has some clue of what is going on helps.
thanks a ton and sorry for the incomplete post that I made earlier.
regards,
prabhu
More information about the vtkusers
mailing list