<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoPlainText>Hi,<o:p></o:p></p>

<p class=MsoPlainText>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I am having refresh issues while using vtk and
opengl in the same <o:p></o:p></p>

<p class=MsoPlainText>&gt; application. Here is some detail about the issue I
have,<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I have 2 windows (MFC based app),
One window uses <o:p></o:p></p>

<p class=MsoPlainText>&gt; Opengl to display a human model (basically reading
an stl file and constructing it).<o:p></o:p></p>

<p class=MsoPlainText>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The other window is constructed
using vtk. The same <o:p></o:p></p>

<p class=MsoPlainText>&gt; human model is being displayed in this window too.<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Now, the issue is the human model
appears fine in the <o:p></o:p></p>

<p class=MsoPlainText>&gt; vtk window fine, but the opengl window initially
does not display when <o:p></o:p></p>

<p class=MsoPlainText>&gt; the window is shown but once I refresh it by a click
in the opengl <o:p></o:p></p>

<p class=MsoPlainText>&gt; window the human model comes back. In contrary to it
if I explicitly <o:p></o:p></p>

<p class=MsoPlainText>&gt; call glFInish() and wglMakeCurrentContext(null,
null) in onpaint() of <o:p></o:p></p>

<p class=MsoPlainText>&gt; opengl window the human model appears just fine as
in vtk window. <o:p></o:p></p>

<p class=MsoPlainText>&gt; Since I am newbie I am not making any speculations
for this behavior <o:p></o:p></p>

<p class=MsoPlainText>&gt; but feel that vtk is holding up some handles,
resources etc which is being used by opengl window.<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I appreciate any thoughts about the
issues and what is <o:p></o:p></p>

<p class=MsoPlainText>&gt; the better way of using vtk vs opengl in the same
application.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks all in advance.<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; Thanks,<o:p></o:p></p>

<p class=MsoPlainText>&gt; Uday<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>