[vtkusers] How to use vtk with OpenGL?

博 刘 liu_bo_1983 at yahoo.com.cn
Sun Jun 5 21:44:04 EDT 2005


hello!
       I want to render something in the vtkWin32OpenGLRenderWindow using OpenGL. The sentenses are as follow:
 
////////////////////////////////////////
...................    
 
 this->renWin->AddRenderer(this->ren);
 this->renWin->SetParentId(this->m_hWnd);
 this->iren->SetInteractorStyle(this->interactorStyle);
 this->iren->SetRenderWindow(this->renWin);   
 this->ren->AddActor(this->axesActor);
renWin->Render();
for (i = 5; i >= 0; i--)
 {
  glBegin (GL_LINE_LOOP);
  glNormal3fv (&n[i][0]);
  glVertex3fv (&v[faces[i][0]][0]);
  glVertex3fv (&v[faces[i][1]][0]);
  glVertex3fv (&v[faces[i][2]][0]);
  glVertex3fv (&v[faces[i][3]][0]);
  glEnd ();
 }
   iren->Start();
//////////////////////////////////////////
but it seems not to take effect. is there anything I should take care of to use vtk with opengl? If someone could offer samples , it would be terrific.
Thanks in advance.
 
 

		
---------------------------------
DO YOU YAHOO!?
  雅虎免费G邮箱-中国最强免费防毒反垃圾超大邮箱 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050606/80a0c100/attachment.htm>


More information about the vtkusers mailing list