[vtkusers] Threading

Lars Friedrich lfriedri at imtek.de
Wed Jan 31 03:11:06 EST 2007


Hello

Am Montag, den 29.01.2007, 09:53 +0100 schrieb xabi riobe:
> I can't help you for the thread issue, but if you want to see the
> message error, use vtkFileOutputWindow to keep the messages in a log
> file.

Thank you. I used the vtkFileOutputWindow and got the following error
messages:

ERROR: In \enthon\src\Vtk-5.0\Rendering\vtkWin32OpenGLRenderWindow.cxx,
line 238
vtkWin32OpenGLRenderWindow (01237AF8): wglMakeCurrent failed in
MakeCurrent(), error: The handle is invalid.

ERROR: In \enthon\src\Vtk-5.0\Rendering\vtkWin32OpenGLRenderWindow.cxx,
line 129
vtkWin32OpenGLRenderWindow (01237AF8): wglMakeCurrent failed in Clean(),
error: 6

Can anyone tell me what is going wrong? The code is below, it works fine
on Linux, but on Windows I get the errors.

Lars


> > from threading import Thread
> > from time import sleep
> >
> > import vtk as V
> >
> > w = V.vtkRenderWindow()
> > ren = V.vtkRenderer()
> > w.AddRenderer(ren)
> >
> > class vtkThread(Thread):
> > 	def __init__(self, win):
> > 		Thread.__init__(self)
> > 		self.win = win
> > 	def run(self):
> > 		for i in range(10):
> > 			self.win.Render()
> > 			sleep(1)
> >
> > t = vtkThread(w)
> >
> > t.start()
> > t.join()




More information about the vtkusers mailing list