[vtkusers] dual QVTKWidget2 of the same scene performance problem
Sylvain Anderegg
sylvain.anderegg at cascination.com
Thu Aug 9 09:02:15 EDT 2012
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
More information about the vtkusers
mailing list