[vtk-developers] VTK Web with no window opened by the VTK server

Dan Lipsa dan.lipsa at kitware.com
Thu Aug 31 15:27:07 EDT 2017


Hi all,

The solution is to replace:
-            renderWindowInteractor = vtk.vtkRenderWindowInteractor()
with
+            renderWindow.OffScreenRenderingOn()
+            renderWindowInteractor = vtk.vtkGenericRenderWindowInteractor()

The problem was that vtkRenderWindowInteractor created a window to read
events from.

Thanks Seb and Utkarsh for your help.
Dan




On Thu, Aug 31, 2017 at 12:03 PM, Dan Lipsa <dan.lipsa at kitware.com> wrote:

>
>
> On Thu, Aug 31, 2017 at 11:35 AM, Sebastien Jourdain <
> sebastien.jourdain at kitware.com> wrote:
>
>> The solution was in my first email
>>
>> => If you use pvbatch, that should work out of the box with
>> PV_ALLOW_BATCH_INTERACTION=1.
>>
>
> Nice! This does work. Sorry, I missed this.
>
>
>
>>
>> For the window part ask Utkarsh since he did that work a couple weeks ago
>> on ParaView...
>>
>> On Thu, Aug 31, 2017 at 9:30 AM, Dan Lipsa <dan.lipsa at kitware.com> wrote:
>>
>>> On Thu, Aug 31, 2017 at 11:20 AM, Sebastien Jourdain <
>>> sebastien.jourdain at kitware.com> wrote:
>>>
>>>> And then if you use pvbatch instead of pvpython, that window disappear
>>>> the way you want...
>>>>
>>>
>>> While this works to show the cone on the client, it crashes when you try
>>> to interact with it. I've seen the same
>>> behavior for the VTK server if you don't set the interactor at all.
>>>
>>>
>>> There are many reasons why that's the case but mostly history. What
>>>> ParaView is doing is figuring out at runtime which render window it should
>>>> instantiate.
>>>> Since you are not in ParaView, you have to implement that logic
>>>> yourself.
>>>>
>>>
>>> I think it chooses different render windows only if EGL or OSMesa are
>>> available. Otherwise it just sets OffScreenRenderingOn(). I'll dig to see
>>> what else it does so that no window shows.
>>>
>>> Thanks Seb.
>>>
>>> Dan
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170831/5def34d8/attachment.html>


More information about the vtk-developers mailing list