[vtkusers] about the reference count

Yixun Liu yxliu at fudan.edu.cn
Wed Apr 20 21:45:56 EDT 2005


Hi,

Below is the source code of the VTK. I do not understand the code:   vtkRenderWindow *renWin = (vtkRenderWindow *)win.  Because it will cause error when win->MakeCUrrent() is called. Hope your help!

void vtkActor::ReleaseGraphicsResources(vtkWindow *win)
{
  vtkRenderWindow *renWin = (vtkRenderWindow *)win;

  // pass this information onto the mapper
  if (this->Mapper)
    {
    this->Mapper->ReleaseGraphicsResources(renWin);
    }

  // pass this information onto the texture
  if (this->Texture)
    {
    this->Texture->ReleaseGraphicsResources(renWin);
    }
}


void vtkOpenGLPolyDataMapper::ReleaseGraphicsResources(vtkWindow *win)
{
  if (this->ListId && win)
    {
    win->MakeCurrent();  ?????????(win belog to the vtkRenderWindow class and only has pure virtual method: MakeCurrent())
    glDeleteLists(this->ListId,1);
    this->ListId = 0;
    }
  this->LastWindow = NULL; 
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050421/91984921/attachment.htm>


More information about the vtkusers mailing list