[vtkusers] Adding a renderer vs setting its render window

Ken Martin ken.martin at kitware.com
Mon Jun 20 15:30:54 EDT 2016


I think that comment is super old. Way back before we had proper object
factories we would create renderers using a MakeRenderer function. The
standard way to do it now is to create a renderer like any other VTK object
and add it to the renderwindow. That will, as a convenience, set the
renderwindow on the renderer as well. So that part of the comment is still
true. You should generally not need to call SetRenderWindow as AddRenderer
has already done it for you.

Thanks
Ken


On Thu, Jun 16, 2016 at 7:21 AM, Elvis Stansvik <
elvis.stansvik at orexplore.com> wrote:

> What is the difference between
>
>     renderer.SetRenderWindow(renderWindow)
>
> and
>
>     renderWindow.addRenderer(renderer)
>
> ? Is it just two different ways of doing the same thing?
>
> Also, the docs for SetRenderWindow [1] says
>
> "This is automatically set when the renderer is created by MakeRenderer.
> The user probably shouldn't ever need to call this method."
>
> But I couldn't find any info in the docs about a MakeRenderer. Digging in
> the VTK source, it seems there's a vtkParallelRenderManager::MakeRenderer.
> Is that the one the docs refers to? Could someone clarify this note in the
> docs? Why shouldn't I need to call SetRenderWindow?
>
> Elvis
>
> [1]
> http://www.vtk.org/doc/nightly/html/classvtkRenderer.html#ae3a6088ecdcdec6b7e0b6482974de8c2
>
> _______________________________________________
> 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:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>


-- 
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee.  Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160620/e99972e5/attachment.html>


More information about the vtkusers mailing list