[vtkusers] Re: vtkusers digest, Vol 1 #2264 - 3 msgs
Andres Barrera
andresba at hotmail.com
Fri Dec 19 10:42:57 EST 2003
Thank you Clint. I had done what you say, but without setting
"vtkMapper::GlobalImmediateModeRenderingOn()". I had a very weird behavior
in both windows (actors changing colors and desapearing). I'll try your
suggestion.
Thanks again
Andres
>I'm not sure that is supposed to work. I'd make two different
>vtkRenderers, and give them the same vtkProps. You'd have to set
>vtkMapper::GlobalImmediateModeRenderingOn() (otherwise one of the windows
>won't get drawn to correctly) because the two windows will have two
>different rendering contexts and you can't share mappers between the two
>windows unless you use immediate mode rendering.
>
>Clint
>
> > Message: 1
> > From: "Andres Barrera" <andresba at hotmail.com>
> > To: vtkusers at vtk.org
> > Date: Thu, 18 Dec 2003 19:45:55 -0600
> > Subject: [vtkusers] same Renderer in 2 windows
> >
> > Dear list,
> >
> > I want to display the same scene in two different windows, from
> > different
> > points of view.
> >
> > My idea was to create a vtkRenderer with two cameras, and render in
> > into 2
> > diferent vtkRenderWindows switching the active one.
> >
> > The problem I have is that after the initialization, whenever I call
> > " *
> > *
> > renWIN->Render();
> > renWIN_AUX->Render();
> > *
> > *"
> > only the "renWIN_AUX" is refreshed. (if in the initialization I first
> > assign the renderer -"renGENERAL"- to "renWIN_AUX", then only "renWIN"
>is
> >
> > updated.) See code below...
> >
> > Can anyone help me here?
> >
> > Thank you in advance.
> >
> > Andres
> >
> >
> >
> >
> > My initialization:
> >
> > void vtk_Initialization()
> > {
> > *
> > *
> > *
> > renGENERAL = vtkRenderer::New(); //renderer...
> > renWIN = vtkRenderWindow::New(); //window
> > iREN = vtkRenderWindowInteractor::New();//interactor
> >
> > renWIN->AddRenderer(renGENERAL);
> > iREN = vtkWin32RenderWindowInteractor::New();
> > iREN->SetRenderWindow(renWIN); // begin mouse
> > interaction
> > vtkInteractorStyleTrackballCamera *IC =
> > vtkInteractorStyleTrackballCamera::New();
> > iREN->SetInteractorStyle( IC);
> >
> >
> > renWIN_AUX = vtkRenderWindow::New(); //window
> > iREN_AUX = vtkRenderWindowInteractor::New();
> >
> > renWIN_AUX->AddRenderer(renGENERAL);
> > iREN_AUX = vtkWin32RenderWindowInteractor::New();
> > iREN_AUX->SetRenderWindow(renWIN_AUX); // begin mouse
> >
> > interaction
> > *
> > *
> > *
> > }
> >
>
_________________________________________________________________
Working moms: Find helpful tips here on managing kids, home, work and
yourself. http://special.msn.com/msnbc/workingmom.armx
More information about the vtkusers
mailing list