<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial>Hi,</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Below is the source code of the VTK. I do
not understand the code: <STRONG> vtkRenderWindow *renWin =
(vtkRenderWindow *)win. </STRONG>Because it will cause error when
<STRONG>win->MakeCUrrent()</STRONG> is called. Hope your help!</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT><FONT face=Arial>void vtkActor::ReleaseGraphicsResources(vtkWindow
*win)<BR>{<BR><STRONG> vtkRenderWindow *renWin = (vtkRenderWindow
*)win;</STRONG></FONT></FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial> // pass this information onto the mapper<BR>
if (this->Mapper)<BR> {<BR></FONT><FONT
face=Arial><STRONG>
this->Mapper->ReleaseGraphicsResources(renWin);<BR></STRONG>
}</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial> // pass this information onto the texture<BR>
if (this->Texture)<BR> {<BR>
this->Texture->ReleaseGraphicsResources(renWin);<BR>
}<BR>}<BR></FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT size=2><FONT face=Arial size=3>void
vtkOpenGLPolyDataMapper::ReleaseGraphicsResources(vtkWindow *win)<BR>{<BR>
if (this->ListId && win)<BR> {<BR></FONT><FONT
face=Arial><FONT size=3><STRONG> win->MakeCurrent();
?????????(win belog to the vtkRenderWindow class and only has pure virtual
method: MakeCurrent())<BR></STRONG>
glDeleteLists(this->ListId,1);<BR> this->ListId =
0;<BR> }<BR> this->LastWindow = NULL;
<BR>}</FONT></FONT></DIV></FONT></BODY></HTML>