[vtkusers] wxWindows

David Gobbi dgobbi at imaging.robarts.ca
Fri Aug 30 14:02:05 EDT 2002


On Fri, 30 Aug 2002, John Biddiscombe wrote:

> One thing that may cause trouble is that I have options for turning on/off stereo rendering (glasses etc) etc, but these require the window to be destroyed and recreated. Is there a convenient hook into DestroyHandle and CreateHandle under wx?

A cheap trick is to just set the EyeAngle to zero when you want to turn
off stereo.  Otherwise, yes, you will have to destroy and recreate both
the wxWindow and the vtkRenderWindow every time you switch.

With some vendors' OpenGL drivers you can create a StereoCapableWindow
and just use StereoRenderOn()/Off() to switch, but some other drivers
will spew garbage if you do a non-stereo render inside a stereo context.

> > The only tricky thing is that the wxWindow has to be mapped
> > to the screen before the first Render is called.
>
> Noted. I'll remember this. I'm still only playing with wx right now, but when I get there....

There might also be some funky stuff you need to keep the wxWindow 'erase'
from causing flicker, but this might just be for the GTK version of
wxWindows.  It should all be in the python script.

 - David




More information about the vtkusers mailing list