Hi Vtk users!!!!<br>
<br>
I'm developing an animation, and I'm using QVTK for<br>
provide user interface..<br>
<br>
I'm recentily post this message in Qt-interest lists:<br>
<a href="http://lists.trolltech.com/qt-interest/2005-10/thread00210-0.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.trolltech.com/qt-interest/2005-10/thread00210-0.html</a><br>
<br>
And I'm tryed to solver this with QThread (thanks for help..).....but, again, <br>
I have other problem....<br>
<br>
When my application call render() function in my qthread object,<br>
VTK show this message:<br>
vtkWin32OpenGLRenderWindow: wglMakeCurrent failed in... ( sorry,<br>
I canīt read, application crash!)<br>
<br>
Wath's wrong???<br>
<br>
<br>
My code:<br>
<br>
class PlayThread : public QThread<br>
{<br>
public:<br>
<br>
PlayThread(){ play=true };<br>
<br>
void run();<br>
<br>
void stop();<br>
<br>
void SetAnimator( Animator *ms );<br>
<br>
void SetRenderer( vtkRenderer *r );<br>
<br>
private:<br>
<br>
volatile bool play;<br>
<br>
Animator *ani;<br>
<br>
vtkRenderer *rthread;<br>
};<br>
<br>
/********************/<br>
<br>
void PlayThread::run(){<br>
<br>
while (this->play)<br>
{ <br>
this->ani->StartUpdate();<br>
this->rthread->GetRenderWindow()->Render(); // here occur the
error... <br>
<div id="mb_0">
}<br>
<br>
this->play = true;<br>
}<br>
<br>
<br>
void PlayThread::stop(){<br>
this->play = false;<br>
}<br>
<br>
.<br>
.<br>
.<br>
/*********************/<br>
// Main widget....<br>
void Viewer::play_simulation(){<br>
<br>
if ( !this->play_thread->isRunning() )<br>
this->play_thread->start();<br>
}<br>
<br>
void Viewer::stop_simulation(){<br>
if (this->play_thread->isRunning() )<br>
this->play_thread->stop();<br>
}<br>
<br>
<br>
<br>
Does somebody can help me ?<br>
<br>
Thanks a lot!!!<br>
Pilato Jr.</div>