[vtkusers] socket communication

jean-michel.rouet at philips.com jean-michel.rouet at philips.com
Wed Feb 2 11:08:15 EST 2005

On 02/02/2005 16:17:14 Simon Drouin wrote:
>Rendering from a different thread than the main thread is never a good
>idea. Your listener thread should just post an event to the main loop
>when it receives a camera event from the socket. When the main loop
>processes the event, then you can call Render(). I do that with Qt under
>linux (QApplication::postEvent()), but it is probably as easy to do
>using Windows.
>Simon Drouin

Thanks for your answer Simon,

I also tried posting an event from the listener thread
using the 
In the main code, I do have an observer of the UserEvent attached to the 
renderer that calls Render().
Nevertheless, this did not work and gave exactly the same error ! 
(wglMakeCurrent failed in MakeCurrent()).

Any other idea ? Is there an other Event I can post/Invoke to force an 
update of the renderer? 

More information about the vtkusers mailing list