[vtkusers] dual QVTKWidget2 of the same scene performance problem

Sylvain Anderegg sylvain.anderegg at cascination.com
Fri Aug 10 02:24:53 EDT 2012


Hi Arnaud,

Yes I tried also with QVTKWidget with the same result.
 From my understanding of OpenGL, if you want to use the same display 
lists in several viewers (different OpenGL contexts) you must share the 
context between them. If you don't then they all have their own display 
lists which uses much more memory.
As I said, cloning my vtkActor sort of solves the issue, but if I 
compare to pure OpenGL or OpenInventor, this is a waste of ressources.

Sylvain


On 09.08.2012 22:41, Arnaud BARRE wrote:
> 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

-- 
Sylvain Anderegg
Head of Software Development CAScination AG


--

Sylvain Anderegg | Head of Software Development
CAScination AG | Stauffacherstrasse 78 | 3014 Bern | Switzerland
Tel: +41 31 631 5965
Email: sylvain.anderegg at CAScination.ch | Web: http://www.CAScination.ch

CONFIDENTIALITY NOTICE: This transmission (including any attachments) contains information which is confidential and is intended solely for the individual or entity named above. If you are not the intended recipient, please be aware that any interception, copying, distribution, disclosure or business use of this transmission or any information contained in it is not allowed. If you have received this transmission in error, please notify the sender at the e-mail address above and delete the transmission from all forms of electronic or other storage, and destroy all hard copies.





More information about the vtkusers mailing list