Thanks for your reply.<div>That's exactly what we are doing : vtkPanel is the entry point of our DLL (native C++). It is a simple class which receive as input the handle of a panel (hence the name), itself attached in a Form.</div>
<div><br></div><div>When using this method with MFC/WinForm, the result are very good. When switching to .NET 2008, the results are dropping dramatically ... </div><div><br></div><div>I will try with a PictureBox just to be sure...</div>
<div><br></div><div>Fred.</div><div><br></div><div><br><div class="gmail_quote">2011/2/24 Joseph Melnyk <span dir="ltr"><<a href="mailto:JMelnyk@pile.com">JMelnyk@pile.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">






<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">I’ve done something similar: CLR (by way of C++/CLI) to interface with native C++ vtk, create a DLL from this and link it into a .NET windows form.  Within the DLL, I’m simply
 assigning the vtk RenderWindows to passed-in .NET PictureBox controls, however.  What is this vtkPanel that you mention?</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I’m getting frame rates close to what you mention (80-100 fps), but this could simply be my application, machine, etc.  I’ve not tested these various other scenarios to see
 if it improves/degrades otherwise. </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a> [mailto:<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>]
<b>On Behalf Of </b>Frederic DANESI</span></p>
</div>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">We came accross something weird when using Visual Studio CLR.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">We have created a very simple VTK pipeline (load a STL file => render => move the camera around while taking screen shots).</p>
</div>
<div>
<p class="MsoNormal">Those operation are integrated in a vtkPanel, build as a C++ DLL.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">When using this DLL in a console application (with the VTK default RenderWindow), we get a framerate of 100 fps.</p>
</div>
<div>
<p class="MsoNormal">When using this DLL in a winform application (Visual Studio 6,MFC, no CLR), we get the same framerate.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">When using this DLL in a .Net Windows Form (Visual Studio 10, CLR) we get a framerate of 26 fps, which is not acceptable.</p>
</div>
<div>
<p class="MsoNormal">(Obvisously, if we use directly the VTK classes inside the CLR project without building a library, the framerate is even worse : 6 fps).</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:10.5pt">Does anyone have knowledge about using VTK inside a CLR application without such a loss of performance ? Are we missing something ?</p>
</div>
</div>
</div>
</div>
<br>
__Scanned by MessageLabs<br>
</div>

</blockquote></div><br><br clear="all"><br>-- <br><br><br>Cordialement,<br>F.Danesi<br>-- <br>Responsable Développement Informatique et Travail Collaboratif<br>Centre Technique DINCCS (Centre Technique Dédié à l’Ingénierie Numérique, la Conception Collaborative et la Simulation)<br>
MICADO / DINCCS<br>Pôle de Haute Technologie, BP 90005<br>08005 Charleville-Mézières Cedex<br>Tel. : +33 (0) 3.24.41.69.55 / +33 (0) 6.62.76.13.32<br>Email : <a href="mailto:frederic.danesi@dinccs.com">frederic.danesi@dinccs.com</a><br>
Web : <a href="http://www.afmicado.com">www.afmicado.com</a> / <a href="http://www.dinccs.com">www.dinccs.com</a><br><br>-----<br><br>DISCLAIMER :<br>This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.<br>
<br>
</div>