<!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>&nbsp;</DIV>
<DIV><FONT face=Arial>Below is the source code of the VTK. I do 
not&nbsp;understand the code:&nbsp;<STRONG>&nbsp; vtkRenderWindow *renWin = 
(vtkRenderWindow *)win.&nbsp; </STRONG>Because it will cause error when 
<STRONG>win-&gt;MakeCUrrent()</STRONG> is called. Hope your help!</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT><FONT face=Arial>void vtkActor::ReleaseGraphicsResources(vtkWindow 
*win)<BR>{<BR><STRONG>&nbsp; vtkRenderWindow *renWin = (vtkRenderWindow 
*)win;</STRONG></FONT></FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>&nbsp; // pass this information onto the mapper<BR>&nbsp; 
if (this-&gt;Mapper)<BR>&nbsp;&nbsp;&nbsp; {<BR></FONT><FONT 
face=Arial><STRONG>&nbsp;&nbsp;&nbsp; 
this-&gt;Mapper-&gt;ReleaseGraphicsResources(renWin);<BR></STRONG>&nbsp;&nbsp;&nbsp; 
}</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>&nbsp; // pass this information onto the texture<BR>&nbsp; 
if (this-&gt;Texture)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; 
this-&gt;Texture-&gt;ReleaseGraphicsResources(renWin);<BR>&nbsp;&nbsp;&nbsp; 
}<BR>}<BR></FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2><FONT face=Arial size=3>void 
vtkOpenGLPolyDataMapper::ReleaseGraphicsResources(vtkWindow *win)<BR>{<BR>&nbsp; 
if (this-&gt;ListId &amp;&amp; win)<BR>&nbsp;&nbsp;&nbsp; {<BR></FONT><FONT 
face=Arial><FONT size=3><STRONG>&nbsp;&nbsp;&nbsp; win-&gt;MakeCurrent();&nbsp; 
?????????(win belog to the vtkRenderWindow class and only has pure virtual 
method: MakeCurrent())<BR></STRONG>&nbsp;&nbsp;&nbsp; 
glDeleteLists(this-&gt;ListId,1);<BR>&nbsp;&nbsp;&nbsp; this-&gt;ListId = 
0;<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp; this-&gt;LastWindow = NULL; 
<BR>}</FONT></FONT></DIV></FONT></BODY></HTML>