[vtkusers] How to update the renderer when the data is modified?

Obada Mahdi omahdi at gmx.de
Fri Nov 3 10:37:48 EST 2006


Hi Ali,

just for the record, any chance that there are multiple threads
involved in your code?  Depending on what the rest of your code does,
there might actually be two problems, the "wglMakeCurrent failed"
error not being related to VTK pipeline updates:

As stated in e.g.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_2u0k.asp
or
http://public.kitware.com/pipermail/vtkusers/2004-April/073478.html
care must be taken when using OpenGL contexts in an environment with
multiple threads.  I am not sure where that "RenderEvent" is fired
from in your code, but if it is not from the main thread (more
precisely, a thread different from the one where vtkImageViewer2 was
created), that could account for the GL error.


Just an idea,

Obada



More information about the vtkusers mailing list