[vtkusers] dual QVTKWidget2 of the same scene performance problem

Arnaud BARRE arnaud.barre at gmail.com
Thu Aug 9 16:41:41 EDT 2012


Dear Sylvain,

I'm not a VTK developer and I have few experience with QVTKWidget2 but
dit you try without sharing the OpenGL context?

I'm not familiar with the sharing of OpenGL context, but in my case, I
use several QVTKWidget2 to show spheres/planes/lines and I don't have
such kind of slow down. I'm around 20-25FPS (using a QTimer) on a
MabBook Pro 2008 (as it was already the case with the use of
QVTKWidget). As you, I shared the VTK object between all the
QVTKWidget2 widgets but I don't use any shared OpenGL context. Could
it be the problem? Otherwise, it can be also related to the number of
mappers used. Have you also tried with QVTKWidget?

Arnaud

On Thu, Aug 9, 2012 at 3:02 PM, Sylvain Anderegg
<sylvain.anderegg at cascination.com> wrote:
> Dear VTK developers,
>
> I am currently trying to develop an application on a dual screen system.
> Therefore I want to show 2 QVTKWidget2 (with openGL context shared) showing
> the very same vtk scene from different point of views. My software is
> connected to some camera that updates the position of some tracked objects.
> Therefore, I call the Render() function of each QVTKWidget2 renderWindow for
> every position update. I don't know if that is the best way to do it?
>
> My objects are each composed of a vtkAssembly, in turn containing a
> transformation and several actors read from a vrml model file.
>
>
> As a first trial I passed the same instance of each of these objects to both
> QVTKWidget2 renderer in order to spare memory. The result was that as long
> as only one QVTKWidget2 is visible it was alright, but when both QVTKWidget2
> are visible, the frame rate drops dramatically (~2fps on a modern computer
> with professional GPU). As the OpenGL contexts are shared I don't get why
> this happens??
>
> On a second trial I cloned my vtkAssembly objects and passed one to each
> viewer which seems to work better on the framerate side. But now the memory
> footprint increases dramatically. Is there anyway share viewed objects
> between QVTKWidget2? or is there something completely wrong in how I created
> this?
>
>
> Sylvain
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list