[vtkusers] Visual Studio CLR makes VTK really slow ...

Frederic DANESI frederic.danesi at dinccs.com
Thu Feb 24 17:05:43 EST 2011


Thanks for your reply.
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.

When using this method with MFC/WinForm, the result are very good. When
switching to .NET 2008, the results are dropping dramatically ...

I will try with a PictureBox just to be sure...

Fred.


2011/2/24 Joseph Melnyk <JMelnyk at pile.com>

>  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?
>
>
>
> 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.
>
>
>
>
>
> *From:* vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] *On
> Behalf Of *Frederic DANESI
>
>
>
> We came accross something weird when using Visual Studio CLR.
>
>
>
> We have created a very simple VTK pipeline (load a STL file => render =>
> move the camera around while taking screen shots).
>
> Those operation are integrated in a vtkPanel, build as a C++ DLL.
>
>
>
> When using this DLL in a console application (with the VTK default
> RenderWindow), we get a framerate of 100 fps.
>
> When using this DLL in a winform application (Visual Studio 6,MFC, no CLR),
> we get the same framerate.
>
>
>
> When using this DLL in a .Net Windows Form (Visual Studio 10, CLR) we get a
> framerate of 26 fps, which is not acceptable.
>
> (Obvisously, if we use directly the VTK classes inside the CLR project
> without building a library, the framerate is even worse : 6 fps).
>
>
>
> Does anyone have knowledge about using VTK inside a CLR application without
> such a loss of performance ? Are we missing something ?
>
> __Scanned by MessageLabs
>



-- 


Cordialement,
F.Danesi
-- 
Responsable Développement Informatique et Travail Collaboratif
Centre Technique DINCCS (Centre Technique Dédié à l’Ingénierie Numérique, la
Conception Collaborative et la Simulation)
MICADO / DINCCS
Pôle de Haute Technologie, BP 90005
08005 Charleville-Mézières Cedex
Tel. : +33 (0) 3.24.41.69.55 / +33 (0) 6.62.76.13.32
Email : frederic.danesi at dinccs.com
Web : www.afmicado.com / www.dinccs.com

-----

DISCLAIMER :
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110224/f25cc760/attachment.htm>


More information about the vtkusers mailing list