[vtkusers] two renderer in renderwindow

Thomas Faust tf at thermoanalytics.com
Fri May 28 11:03:00 EDT 2004


Thanks, this solved the problem.

This email-list just rocks !!!
Keep going !!

On Friday 28 May 2004 10:52 am, Amy Henderson wrote:
> Hi Thomas,
>
> The thing that jumps out at me from your code snippet is that the renderer
> layers are now in the wrong order. Awhile ago (certainly before the current
> version of VTK), the order of renderer layers was changed so that the
> bottom-most layer was numbered 0, and layers on top of it had increasing
> layer numbers.
>
> This e-mail explains the reasons for the change:
> http://vtk.org/pipermail/vtkusers/2004-February/022036.html.
>
> - Amy
>
> At 10:43 AM 5/28/2004, Thomas Faust wrote:
> >Hi VTK users.
> >
> >A while ago (with an older version of vtk) I wrote a application, that
> >handles
> >two renderer in one renderwindow. A main renderer and a renderer that
> > holds three arrows to see the rotation of the volume in the other
> > renderer.
> >
> >This is what i did:
> >
> >-- snip --
> >renderwindow->SetNumberofLayers( 2 );
> >renderwindow->AddRenderer( axesRenderer );
> >axesRenderer->SetLayer( 0 );
> >axesRenderer->SetBackground( 1.0, 1.0, 1.0 );
> >axesRenderer->SetViewport( 0.0, 0.8, 0.2, 1.0 );
> >   // 20% in the upper left corner
> >
> >renderwindow->AddRenderer( mainRenderer );
> >mainRenderer->SetLayer( 1 );
> >mainRenerer->SetBackground( 1.0, 1.0, 1.0 );
> >-- end snip --
> >
> >I worked fine until I updated the the current VTK version.
> >
> >Now I get a very ugly behavior when rotating the model. The background
> > don't get white again and when interacting with the model, it leaves
> > prints wherever it was drawn.
> >
> >Did somebody saw the same behavior?
> >What is the right way to display two renderer correctly?
> >
> >
> >_______________________________________________
> >This is the private VTK discussion list.
> >Please keep messages on-topic. Check the FAQ at:
> ><http://public.kitware.com/cgi-bin/vtkfaq>
> >Follow this link to subscribe/unsubscribe:
> >http://www.vtk.org/mailman/listinfo/vtkusers
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq> Follow this link to
> subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list