[vtkusers] Moving Renderer to another Window

Elvis Stansvik elvis.stansvik at orexplore.com
Fri Nov 23 11:34:55 EST 2018


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
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181123/dafd1f27/attachment.html>


More information about the vtkusers mailing list