[vtkusers] Why do my vtkRenderWindows divide up the frame rate?

David Gobbi david.gobbi at gmail.com
Mon Oct 12 21:09:58 EDT 2015


Hi Thomas,

The default behavior of vtkRenderWindow is to wait for the vblank before
swapping the buffers.  So with multiple RenderWindows, the result is slow
rendering and, even worse, the windows aren't synchronized.  You can try
the following work-around:

For each window, call SwapBuffersOff() before calling Render().  This
allows each window to do its rendering without swapping the buffers.
Then, call SwapBuffersOn() and Frame() for each window.  This will
synchronize the buffer swapping.

 - David


On Mon, Oct 12, 2015 at 5:50 PM, Kirchner, Thomas <
t.kirchner at dkfz-heidelberg.de> wrote:

> Hello everyone,
>
> i am trying to get multiple vtkRenderWindows to render (4 different
> image streams in my case) simultaneously at 60fps which seems to be the
> frame rate limit for one single vtkRenderWindow (at least with my
> screen). It appears to me that multiple render windows in the same
> application share those 60fps ... e.g. yielding exactly 15fps for 4
> windows.
> If i just start a new application for each window this does not occur
> (which gives me hope but doesn't help)
>
> I can't figure out why this frame rate limit is "shared" and i dont think
> this behavior is intended. But maybe you guys know how i can avoid this
> effect?
> (my simple example, mostly stitched together from other example code is
> attached)
>
> Any help would be greatly appreciated.
>
> Thanks in advance
> Thomas
>
> --
> Thomas Kirchner
> German Cancer Research Center (DKFZ)
> Division Medical and Biological Informatics
> E131 - Computer-assisted Interventions
>
> Im Neuenheimer Feld 280
> 69120 Heidelberg, Germany
> Tel.: +49 (0) 6221 / 42-3543
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151012/35ac7857/attachment.html>


More information about the vtkusers mailing list