[vtkusers] renWin->Render Error
binesh r
binesh01 at yahoo.com
Fri Mar 24 00:13:54 EST 2006
I am trying to run an animation using vtk triggered by a Onbutton event.But I experience problems in executing the statement renWin->Render();It raises the exception (wglMakeCurrent failed).Please suggest what needs to be done to get rid of this error?
Thanks,
Binesh
---------------------------------------------------------------------------------------
void CVtkDlg::OnButton1()
{
AfxBeginThread(Animate,this);
}
UINT CVtkDlg::Animate(LPVOID lp) {
CVtkDlg *dlg=(CVtkDlg *)lp;
dlg->Animate();
return 0;
}
void CVtkDlg::OnButton2()
{
// TODO: Add your control notification handler code here
running= FALSE;
}
void CVtkDlg::Animate() {
for (int i=0;running && i<this->no_row;i++)
{
this->aSplineX->RemoveAllPoints();
this->aSplineY->RemoveAllPoints();
this->aSplineZ->RemoveAllPoints();
for (int j=0;running && j<this->no_col;j++)
{
this->aSplineX->AddPoint(j,x[j]);
this->aSplineY->AddPoint(j,y[i][j]);
this->aSplineZ->AddPoint(j,z[i][j]);
this->inputPoints->InsertPoint(j,x[j],y[i][j],z[i][j]);
}
this->Fit();
renWin->Render();
}
running = FALSE;
}
---------------------------------------------------------------------------------------
---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060323/5c9a0e72/attachment.htm>
More information about the vtkusers
mailing list