[vtkusers] Sharing vtkRenderer?

Cory Quammen cory.quammen at kitware.com
Mon Dec 7 09:06:12 EST 2015


No, you will be passing a pointer to the same data to all of the mappers.
The data itself isn't duplicated when you pass a pointer to it to the
mapper.

On Mon, Dec 7, 2015 at 12:52 AM, rakesh patil <prakeshofficial at gmail.com>
wrote:

> Yes, so I have a common vtkpolydata shared among the four windows. Also
> this data will reside in all the mappers/actors right. .? Won't it be a
> duplicate. ?
>
> Thanks
>
> On Monday, December 7, 2015, Cory Quammen <cory.quammen at kitware.com>
> wrote:
>
>> You'll also need different mappers for the different windows.
>>
>> You can share the data set among the different windows - no need to
>> duplicate. This is because the data model classes do not have any OpenGL
>> context-dependent state.
>>
>> - Cory
>>
>> On Sun, Dec 6, 2015 at 11:52 PM, rakesh patil <prakeshofficial at gmail.com>
>> wrote:
>>
>>> So you mean to say that, in an application if I have 4 windows, each
>>> window will have its own vtkRenderWindow, and each vtkRenderWindow will
>>> have its own renderer. Each renderer will have its own set of actors. This
>>> means there would exist duplicate dataset right. ? Maybe this is next
>>> issue, how to handle single dataset among multiple windows. Does this query
>>> need a new thread.?
>>>
>>> Thanks
>>>
>>>
>>> On Monday, December 7, 2015, Cory Quammen <cory.quammen at kitware.com>
>>> wrote:
>>>
>>>> Actors store some OpenGL state in the mappers they use. While it
>>>> appears to be possible to share some kinds of OpenGL state among the
>>>> different OpenGL contexts in the render windows, VTK is not designed with
>>>> this in mind. Hence, it is safest to have different actors for different
>>>> renderers.
>>>>
>>>> HTH,
>>>> Cory
>>>>
>>>> On Sun, Dec 6, 2015 at 10:50 PM, rakesh patil <
>>>> prakeshofficial at gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Thanks for your reply. It's just a question. Can't I share actors
>>>>> created by smart pointer across multiple renderers. ?
>>>>>
>>>>>
>>>>> On Sunday, December 6, 2015, Cory Quammen <cory.quammen at kitware.com>
>>>>> wrote:
>>>>>
>>>>>> Each vtkRenderWindow should have its own vtkRenderer. Also, you
>>>>>> cannot reliably share actors across different vtkRenderers, so each
>>>>>> vtkRenderer should have its own set of actors.
>>>>>>
>>>>>> - Cory
>>>>>>
>>>>>> On Sat, Dec 5, 2015 at 9:32 AM, rakesh patil <
>>>>>> prakeshofficial at gmail.com> wrote:
>>>>>>
>>>>>>> Hello users,
>>>>>>>
>>>>>>> Is it possible to share a common vtkRenderer object among multiple
>>>>>>> vtkRenderWindows? Or is it that each window should have its own renderer?
>>>>>>> What I need to do is show same actor in different windows but with
>>>>>>> different projections and viewports. Will sharing a common renderer work in
>>>>>>> this case?
>>>>>>>
>>>>>>> Thanks in advance
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Cory Quammen
>>>>>> R&D Engineer
>>>>>> Kitware, Inc.
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Cory Quammen
>>>> R&D Engineer
>>>> Kitware, Inc.
>>>>
>>>
>>
>>
>> --
>> Cory Quammen
>> R&D Engineer
>> Kitware, Inc.
>>
>


-- 
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151207/f7d3f785/attachment.html>


More information about the vtkusers mailing list