[vtkusers] wxWindows and VTK: flickering on unix

Renaud KERIVEN keriven at cermics.enpc.fr
Mon Jun 26 06:37:27 EDT 2000

>>>>> "Maurizio" == Maurizio Turatti <mturatti at ais.it> writes:

    Maurizio> Hi,
    Maurizio> I' m posting this message on both vtkusers and wx-users mailing lists.
    Maurizio> I'm testing Brian Todd's wxVTKWindow, a VTK canvas for wxWindows. I'm drawing an
    Maurizio> object and I use wx events to move it with mouse. In MSW it runs fine, but in
    Maurizio> wxGTK and wxMotif (both 2.1.16) I get a strong flickering during mouse
    Maurizio> interaction and window resizing. It looks like there are too many window's
    Maurizio> clears. I tried to call an empty OnEraseBackground function, but it's useless.
    Maurizio> I don't understand if the problem is related to VTK or wx, so I hope someone can
    Maurizio> give me a suggestion. I can send  a little sample with source code and a unix
    Maurizio> Makefile, if requested. If I'll find an answer I'll forward to Brian Todd, so he
    Maurizio> can patch his code for a public release.

That's   exactly what I   mentioned last week. Since  then,  I've found the
solution: replace SetWindowId  with SetParentId everywhere!  The VTK Renwin
becomes only the child  of the window  created by wxWindows and  thus keeps
good double buffering properties.

For those of us using Java, the same solution should also be applied in
vtkPanel.java, but SetParentId is not bounded :_(((

|     (-:  Don't anthropomorphize computers.  They don't like it. :-)      |
| Renaud KERIVEN                   /\     CERMICS - ENPC                   |
| email: keriven at cermics.enpc.fr  /__\    6 & 8 av Blaise Pascal           |
| tel  : +33       /\  /\   Cite Descartes - Champs s/Marne  |
| fax  : +33      /__\/__\  F-77455 Marne la Vallee (FRANCE) |
| www  : http://cermics.enpc.fr/~keriven/home.html                         |

More information about the vtkusers mailing list