[vtkusers] wglMakeCurrent failed: Thread error?
Junior Pilato
junior.pilato at gmail.com
Mon Oct 10 18:41:03 EDT 2005
Hi Vtk users!!!!
I'm developing an animation, and I'm using QVTK for
provide user interface..
I'm recentily post this message in Qt-interest lists:
http://lists.trolltech.com/qt-interest/2005-10/thread00210-0.html
And I'm tryed to solver this with QThread (thanks for help..).....but,
again,
I have other problem....
When my application call render() function in my qthread object,
VTK show this message:
vtkWin32OpenGLRenderWindow: wglMakeCurrent failed in... ( sorry,
I can´t read, application crash!)
Wath's wrong???
My code:
class PlayThread : public QThread
{
public:
PlayThread(){ play=true };
void run();
void stop();
void SetAnimator( Animator *ms );
void SetRenderer( vtkRenderer *r );
private:
volatile bool play;
Animator *ani;
vtkRenderer *rthread;
};
/********************/
void PlayThread::run(){
while (this->play)
{
this->ani->StartUpdate();
this->rthread->GetRenderWindow()->Render(); // here occur the error...
}
this->play = true;
}
void PlayThread::stop(){
this->play = false;
}
.
.
.
/*********************/
// Main widget....
void Viewer::play_simulation(){
if ( !this->play_thread->isRunning() )
this->play_thread->start();
}
void Viewer::stop_simulation(){
if (this->play_thread->isRunning() )
this->play_thread->stop();
}
Does somebody can help me ?
Thanks a lot!!!
Pilato Jr.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20051010/7cbdba04/attachment.htm>
More information about the vtkusers
mailing list