<div dir="ltr">Daniel,<div><br></div><div>Thanks for sharing the code sample. You are using different actors for different renderers, which is good. But the shallow copy sets the same mapper for each of the different actors. This should be fine within the same renderer, but using the same mapper in different renders is not supported. The reason is because each mapper has some OpenGL state associated with the context in one of the renderers, and that state is not valid in the other renderers.</div><div><br></div><div>It likely worked in the first OpenGL backend by sheer luck.</div><div><br></div><div>HTH,</div><div>Cory</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 9, 2016 at 8:12 AM, -Daniel- <span dir="ltr"><<a href="mailto:ich_daniel@habmalnefrage.de" target="_blank">ich_daniel@habmalnefrage.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Now I try a new compilation and set VTK_RENDERING_BACKEND to OpenGL. It<br>
works!<br>
Why not with OpenGL2?<br>
<br>
approximate example - code snippet:  /<br>
// I create three vtkActors like...<br>
vtkLineSource lineX = new vtkLineSource();<br>
  lineX.SetPoint1(50, 0, 0);<br>
  lineX.SetPoint2(150, 0, 0);<br>
vtkActor lineXActor = setLine(lineX);   // separate method:<br>
vtkLineSource->vtkPolyDataMapper->vtkActor<br>
  lineXActor.GetProperty().SetColor(1, 0, 0);<br>
<br>
// copy of vtkActor<br>
vtkActor copyLineXActor = new vtkActor();<br>
  copyLineXActor.ShallowCopy(lineXActor);<br>
  copyLineXActor.VisibilityOn();<br>
<br>
// add actors to different renderer (  vtkPanel().getRenderer()  )<br>
// -> renderer1.AddActor(lineXActor);<br>
// -> renderer2.AddActor2D(copyLineXActor);<br>
/<br>
The vtkActor's are not visible at the same time. (By using OpenGL2 in the<br>
VTK_Rendering_Backend settings)<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/ShallowCopy-in-vtk-7-0-works-correct-tp5736416p5736442.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/ShallowCopy-in-vtk-7-0-works-correct-tp5736416p5736442.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div>