[vtkusers] Bug with vtkPropPicker and overlapping renderers
Simon Drouin
drouin.simon at gmail.com
Mon Apr 30 12:06:35 EDT 2012
Trying to get the pick position from the first of 2 overlapping renderers
doesn't work. Here is an example:
vtkRenderer * ren0 = vtkRenderer::New();
ren0->SetLayer( 0 );
vtkRenderer * ren1 = vtkRenderer::New();
ren1->SetLayer( 1 );
vtkRenderWindow * win = vtkRenderWindow::New();
win->AddRenderer( ren0 );
win->AddRenderer( ren1 );
......
vtkPropPicker * picker = vtkPropPicker::New();
picker->Pick( x, y, z, ren0 );
double pos[3];
picker->GetPickPosition( pos );
Here, pos will be wrong. The reason seems to be that GetPickPosition()
relies on the content of the z buffer, but the z buffer generated by the
first renderer is being cleared when the second renderer gets rendered.
Anybody has a workaround for that?
s.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120430/e249542c/attachment.htm>
More information about the vtkusers
mailing list