[vtkusers] How can I force the display list to be cleared?

Bryn Lloyd lloyd at itis.ethz.ch
Mon Jan 2 06:46:33 EST 2012


Hi

I am rendering into an existing OpenGL context and am experiencing a 
memory leak, which seems to be related to display lists, which are not 
cleared properly.

I am not sure if this occurs because of my special setup or because of a 
bug in VTK. However, for the moment I would be glad to have a good 
workaround. Is there a way to force VTK to free the display lists?

I am aware that setting ImmediatModeRendering=On will avoid using 
display lists, so this is one workaround (which works), but maybe there 
is a better one, which still allows me to use display lists without 
leaking memory.

Thanks for any suggestions!
Bryn

Ps. for more details about my setup:
I am using the multipass rendering framework as described here 
http://cmake.org/Wiki/VTK/MultiPass_Rendering:
...
     m_Renderer = vtkRenderer::New();

     m_RenderWindow = vtkWin32OpenGLRenderWindow::New();
     m_RenderWindow->AddRenderer(m_Renderer);
     m_RenderWindow->SetMultiSamples(0);
     m_RenderWindow->SetAlphaBitPlanes(1);

     vtkRenderPassCollection * passes = vtkRenderPassCollection::New();
     passes->AddItem(opaquePass);
     passes->AddItem(translucentPass);
     passes->AddItem(volumetricPass);
     passes->AddItem(overlayPass);

     vtkSequencePass * seq = vtkSequencePass::New();
     seq->SetPasses(passes);
     m_Renderer->SetPass(seq);

...





More information about the vtkusers mailing list