[vtkusers] Moving Renderer to another Window

Sankhesh Jhaveri sankhesh.jhaveri at kitware.com
Sun Nov 25 08:55:52 EST 2018


Did you call Render on the new render window after adding the renderer and
before invoking the renderer method?
​

On Fri, Nov 23, 2018 at 11:35 AM Elvis Stansvik <
elvis.stansvik at orexplore.com> wrote:

> 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.
>
> I can have a look at how he worked around gotchas/crashes, but not until
> Monday (on my way home).
>
> 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..
>
> Elvis
>
> Den fre 23 nov. 2018 17:00Matthew Troke <
> matthew.troke at avalonholographics.com> skrev:
>
>> 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?
>>
>> Here is what I tried:
>> - removed renderer from its current window with RemoveRenderer()
>> - created a new vtkRenderWindow with vtkNew and added renderer with
>> AddRenderer()
>> - 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)
>>
>> If I don't remove and add the renderer to another window, I don't get the
>> exception.
>>
>> --
>> Matthew Troke
>> Software Engineer
>> Office: 1-709-701-0239 <(709)%20701-0239>
>> Email: matthew.troke at avalonholographics.com
>>
>> *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.*
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> https://public.kitware.com/mailman/listinfo/vtkusers
>>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
>
-- 
Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
<http://www.kitware.com/> | (518) 881-4417
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181125/d2dcbe23/attachment.html>


More information about the vtkusers mailing list