Hello,<div><br></div><div>I&#39;m working on porting an application made from a mixture of VTK 5.4 and wxWidgets to VTK 5.11 and Qt 4.8.  I have multiple (up to 4) QVTKWidget2s on the screen to display the same data from different viewpoints. Each widget has its own mapper and actor objects, but the mappers all share the same polydata source. It works well until I modify the polydata source and mark it with source-&gt;Modified().  This makes each QVTKWidget2 take a long time to render the first time, and then they all work smoothly again.  I assume they&#39;re rebuilding display lists or something.  Is there any way to improve this performance?  Below is an example application that demonstrates the issue. Press the space key to modify the sphereSource object and then subsequent interactions with the QVTKWidget2 objects will be slow for the first render.  Perhaps I&#39;m not creating multiple views correctly.  Thank you ahead of time for the help!</div>
<div><br></div><div>Thanks,</div><div>Doug</div><div><br></div><div><div><br></div><div><div>SlowQVTKWidget2::SlowQVTKWidget2(QWidget *parent, Qt::WFlags flags)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>: QMainWindow(parent, flags)</div>
<div>{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>QSplitter *splitter = new QSplitter(this);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>QVTKWidget2 *w1 = new QVTKWidget2();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>QVTKWidget2 *w2 = new QVTKWidget2();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>splitter-&gt;addWidget(w1);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>splitter-&gt;addWidget(w2);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>// Create sphereSource which is shared by the vtkPolyDataMappers for both QVTKWidgets</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>//</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>sphereSource = vtkSmartPointer&lt;vtkSphereSource&gt;::New();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>sphereSource-&gt;SetPhiResolution(500);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>sphereSource-&gt;SetThetaResolution(500);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>sphereSource-&gt;Update();</div><div><br></div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>// Create the sphereMapper for the left QVTKWidget, set its source to the sphereSource</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>// Also create an actor for the left QVTKWidget</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkPolyDataMapper&gt; sphereMapper = vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>sphereMapper-&gt;SetInputConnection(sphereSource-&gt;GetOutputPort());</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkActor&gt; sphereActor = vtkSmartPointer&lt;vtkActor&gt;::New();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>sphereActor-&gt;SetMapper(sphereMapper);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>sphereMapper-&gt;Update();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>// sphereMapper2 Uses the same sphereSource as sphereMapper</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>// Also, create sphereActor2 which uses sphereMapper2</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkPolyDataMapper&gt; sphereMapper2 =vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>sphereMapper2-&gt;SetInputConnection(sphereSource-&gt;GetOutputPort());</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkActor&gt; sphereActor2 = vtkSmartPointer&lt;vtkActor&gt;::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>sphereActor2-&gt;SetMapper(sphereMapper2);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>sphereMapper2-&gt;Update();</div><div> </div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>// cube1</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkCubeSource&gt; cubeSource = vtkSmartPointer&lt;vtkCubeSource&gt;::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>cubeSource-&gt;Update();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkPolyDataMapper&gt; cubeMapper =<span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>cubeMapper-&gt;SetInputConnection(cubeSource-&gt;GetOutputPort());</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkActor&gt; cubeActor = vtkSmartPointer&lt;vtkActor&gt;::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>cubeActor-&gt;SetMapper(cubeMapper);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>// cube2</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkPolyDataMapper&gt; cubeMapper2 = vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>cubeMapper2-&gt;SetInputConnection(cubeSource-&gt;GetOutputPort());</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkActor&gt; cubeActor2 = vtkSmartPointer&lt;vtkActor&gt;::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>cubeActor2-&gt;SetMapper(cubeMapper2);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>// VTK Renderer</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkRenderer&gt; leftRenderer = vtkSmartPointer&lt;vtkRenderer&gt;::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkRenderer&gt; rightRenderer = vtkSmartPointer&lt;vtkRenderer&gt;::New();</div><div> </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>cubeActor-&gt;SetPosition(0,2,0);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>cubeActor2-&gt;SetPosition(0,2,0);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>// Add both actors to each renderer</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>leftRenderer-&gt;AddActor(cubeActor);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>leftRenderer-&gt;AddActor(sphereActor);</div><div>
<span class="Apple-tab-span" style="white-space:pre">        </span>rightRenderer-&gt;AddActor(cubeActor2);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>rightRenderer-&gt;AddActor(sphereActor2);</div><div>
 </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>// VTK/Qt wedded</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>w1-&gt;GetRenderWindow()-&gt;AddRenderer(leftRenderer);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>w2-&gt;GetRenderWindow()-&gt;AddRenderer(rightRenderer);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;resize(800,600);</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;setCentralWidget(splitter);</div><div>}</div><div><br></div><div><br></div><div>void SlowQVTKWidget2::keyPressEvent(QKeyEvent *event){</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>// When spacebar is pressed, we adjust sphereSource&#39;s data and mark it as modified.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>// This causes a slow down when the user manipulates the QVTKWidgets.</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>if(event-&gt;key() == 32)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>this-&gt;sphereSource-&gt;SetThetaResolution(600);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>this-&gt;sphereSource-&gt;Modified();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div>}</div></div></div><div><br></div>
<div><br></div>