[vtkusers] vtkRenderWindow within wxPython (wxVTKRenderWindow by Robin Dunn)
Eric Boix
frog at creatis.insa-lyon.fr
Wed Mar 21 13:39:57 EST 2001
Dear VTK (and wxPython) users,
I'm trying to adapt David Gobbi's $VTK/python/vtkRenderWidget.py
to wxPython. I pulled Robin Dunn's "plugin" wxVTKRenderWindow (from
http://download.sourceforge.net/wxpython/wxPython-demo-2.2.5.tar.gz
i.e. the official demos of wxPython).
This works fine when calling it within a wxFrame e.g. :
frame = wxFrame(None, -1, "vtkwxRenderWidget Test", size=(550,400))
vtkWxRender = wxVTKRenderWindow(frame)
The vtkRenderWindow lies nicely inside the X11 window containing the wxFrame.
But (there is a but) this fails when calling it within a wxPanel e.g.
frame = wxFrame(None, -1, "vtkwxRenderWidget Test", size=(550,400))
panel = wxPanel(frame, -1)
vtkWxRender = wxVTKRenderWindow(panel)
The vtkRenderWindow then lives within a new X11 window (different from the X11
window containing the wxFrame) !
Of course :-) I need more than one vtkRenderWindow inside my wxFrame.
Who can be satisfied with a single renderer when one can have many ? :-)
Could it be that wxVTKRenderWINDOW is really different from wxVTKRenderWIDGET
(Tk terminology) meaning I can only have a single instance within each wxFrame ?(apparently wxVTKRenderWindow is based on a call to vtk's
vtk[X-Win32OpenGL]RenderWindow::SetWindowInfo.
Is this the source of the limitation ?)
Any kind of help truly appreciated.
Yours,
Eric Boix
--------------
Research and Applications Center for Image and Signal Processing
http://www.creatis.insa-lyon.fr/
More information about the vtkusers
mailing list