[vtkusers] threads and refreshing vtkRenderWindow

David Cole david.cole at kitware.com
Fri May 15 10:19:51 EDT 2009


I will not claim to be cleverer, but I think I can answer the question:
Your mistake is calling vtkObjects from multiple threads without
synchonization objects. In general, vtkObjects are only safely accessible by
one thread at a time. Multi-thread access means you will have to use some
sort of mutexes or locks to guarantee that only one thread at a time will
call vtkObject methods. Furthermore, you should only attempt to call Render
from the main GUI thread of your application.


Hope this helps,
David


On Fri, May 15, 2009 at 9:25 AM, Giancarlo Amati <ilferraresebono at hotmail.it
> wrote:

>  Hello vtkUSERS!!! This is an ash question for only the cleverer!! :D
>
> I have a thread which modifies some data already in the vtkRenderWindow.,
> now, the problem I have is when I want to refresh the window.
> I though calling something like renderWindow->Render() or
> renderer->render(), but I get some error messages related to "Resource
> already in use" and "wglMakeCurrent()" function error.
>
> Where is my mistake and any idea about how to overcome it?
>
> Kind regards.
>
> GC.
>
> ------------------------------
> Scrivi, parla e gioca con i tuoi amici! Scarica Messenger 2009!<http://messenger.it/gioca.aspx>
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090515/bc06407b/attachment.htm>


More information about the vtkusers mailing list