<FONT color=#0000ff size=2> <div>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?</div> <div>Thanks,</div> <div>Binesh</div> <div>---------------------------------------------------------------------------------------</div> <div>void CVtkDlg::OnButton1() </div> <div>{</div> <div>AfxBeginThread(Animate,this);</div> <div>}</div> <div></div> <div>UINT CVtkDlg::Animate(LPVOID lp) {</div> <div>CVtkDlg *dlg=(CVtkDlg *)lp;</div> <div>dlg->Animate();</div> <div>return 0;</div> <div>}</div> <div>void CVtkDlg::OnButton2() </div> <div>{</div> <div>// TODO: Add your control notification handler code here</div> <div>running= FALSE;</div> <div>}</div> <div></div> <div></div> <div>void CVtkDlg::Animate() {</div> <div></div> <div>for (int i=0;running &&
i<this->no_row;i++)</div> <div>{</div> <div>this->aSplineX->RemoveAllPoints();</div> <div>this->aSplineY->RemoveAllPoints();</div> <div>this->aSplineZ->RemoveAllPoints();</div> <div></div> <div>for (int j=0;running && j<this->no_col;j++)</div> <div>{ </div> <div>this->aSplineX->AddPoint(j,x[j]);</div> <div>this->aSplineY->AddPoint(j,y[i][j]);</div> <div>this->aSplineZ->AddPoint(j,z[i][j]);</div> <div>this->inputPoints->InsertPoint(j,x[j],y[i][j],z[i][j]);</div> <div>}</div> <div>this->Fit();</div> <div>renWin->Render();</div> <div>}</div> <div>running = FALSE;</div> <div></div> <div>}</div> <div>---------------------------------------------------------------------------------------</div></FONT><p>
        
                <hr size=1><a href="http://us.rd.yahoo.com/mail_us/taglines/postman3/*http://us.rd.yahoo.com/evt=39666/*http://beta.messenger.yahoo.com
">Yahoo! Messenger with Voice.</a> PC-to-Phone calls for ridiculously low rates.