[vtkusers] Render images in threads other than main thread

Elvis Stansvik elvis.stansvik at orexplore.com
Tue Apr 3 09:09:01 EDT 2018


2018-04-03 15:01 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
> 2018-04-03 9:48 GMT+02:00 Mathieu Westphal <mathieu.westphal at kitware.com>:
>> Hi Hugh
>>
>> QVTKOpenGLWidget is currently undergoing a complete redesign, the new
>> version should be avaible shortly.
>> In any case you can test it beforehand by compiling  a specific developement
>> branch of VTK, that can be found here:
>> https://gitlab.kitware.com/vtk/vtk/merge_requests/3745
>
> I have to jump in and ask: This new class doesn't make it safe to call
> Render() from threads other than the UI thread, right? Or does it
> change things wrt to threading vs the old QOpenGLWidget?

vs the old QVTKOpenGLWidget I mean of course..

Elvis

>
> Just asking so there are no misunderstandings.
>
> Elvis
>
>>
>> Best,
>>
>>
>> Mathieu Westphal
>>
>> On Mon, Apr 2, 2018 at 12:31 PM, Todd via vtkusers <vtkusers at vtk.org> wrote:
>>>
>>> Hi Hugh
>>>
>>> GUI elements are normally only updated on the main thread, so I suspect
>>> you need to synchronize your callback from the worker thread. I'm not
>>> familiar with Qt, but it seems to be documented.
>>> http://www.informit.com/articles/article.aspx?p=1405551&seqNum=3
>>>
>>> Todd
>>>
>>>
>>> On 2 Apr 2018 10:00 p.m., lor fal <lorfalwit at gmail.com> wrote:
>>>
>>> Hi all:
>>>
>>> I am using QVTKOpenGLWidget to bridge between Qt and Vtk. However, when I
>>> trying to call vtkRenderWindowInteractor::Render in worker thread, it always
>>> report error like "makeCurrent() error", which seems something wrong while
>>> changing OpenGL context. I have googled my questions and found some
>>> suggestions but none of them could work.
>>>
>>> Does anybody know exactly how to render images in worker thread?
>>>
>>> Thanks in advance.
>>>
>>> --
>>> Best regards,
>>> Hugh Lo
>>>
>>>
>>>
>>> _______________________________________________
>>> 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://vtk.org/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://vtk.org/mailman/listinfo/vtkusers
>>


More information about the vtkusers mailing list