<div dir="auto">I think a colleague did something like this for an "export image" feature at work where we wanted to control the resolution of the exported inage.<div dir="auto"><br></div><div dir="auto">I can have a look at how he worked around gotchas/crashes, but not until Monday (on my way home).<div dir="auto"><br></div><div dir="auto">I think the window and renderer have mutual references to each other and need to be broken apart in the right order... Something like that..</div><div dir="auto"><br></div><div dir="auto">Elvis</div></div></div><br><div class="gmail_quote"><div dir="ltr">Den fre 23 nov. 2018 17:00Matthew Troke <<a href="mailto:matthew.troke@avalonholographics.com">matthew.troke@avalonholographics.com</a>> skrev:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Once a vtkRenderer is attached to a vtkRenderWindow, can it be removed and added to a another vtkRenderWindow temporarily to perform an operation in isolation?</div><div><br></div><div>Here is what I tried:</div><div>- removed renderer from its current window with RemoveRenderer()</div><div>- created a new vtkRenderWindow with vtkNew and added renderer with AddRenderer()</div><div>- I called a method on the renderer (which is my own derived class of vtkOpenGLRenderer); inside this method, I create a new vtkTextureObject using the context from the renderwindow and Create2DFromRaw(). This method fails with an exception in vtkTextureObject::Bind() (Handle is null)</div><div><br></div><div>If I don't remove and add the renderer to another window, I don't get the exception.<br> </div><div><div><br>-- <br><div dir="ltr" class="m_-4939717794022060328gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="color:rgb(0,0,0)">Matthew Troke</span></div><div><span style="color:rgb(0,0,0)">Software Engineer</span></div><div><img src="http://www.avalonholographics.com/img/logo.png" width="200" height="46"></div><div><span style="color:rgb(0,0,0)">Office: 1-709-701-0239</span></div><div><span style="color:rgb(0,0,0)">Email:</span> <a href="mailto:matthew.troke@avalonholographics.com" target="_blank" rel="noreferrer">matthew.troke@avalonholographics.com</a></div></div></div></div></div></div></div></div>
<br>
<span lang="EN-CA"><div><i style="background-color:rgb(255,255,255);color:red;font-family:arial,sans-serif;font-size:12.8px;font-weight:bold">This email and any attachments are confidential and may be privileged. Any unauthorized use, disclosure, copying or distribution of the information received is prohibited. If you are not the intended recipient please contact the sender immediately by return email confirming that you have and will delete all communications related to the email and any attachments sent to you in error.</i></div></span>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer 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 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 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 noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div>