[vtkusers] Render several RenderWindows synchronously

David Gobbi david.gobbi at gmail.com
Sat Mar 24 00:44:38 EDT 2012


Hi Zlf,

You can do it like so:

rw1.SwapBuffersOff()
rw1.Render()
rw1.SwapBuffersOn()
rw2.SwapBuffersOff()
rw2.Render()
rw2.SwapBuffersOn()

rw1.Frame()
rw2.Frame()

This ensures that the back buffers don't get swapped to the front
until everything has rendered.  The docs for SetSwapBuffers() and
Frame() provide more info.

 - David


On Fri, Mar 23, 2012 at 10:35 PM, zlf <jxdw_zlf at yahoo.com.cn> wrote:
> Hi
>
> I have three RenderWindows. Each has a volume mapper. Assume volume mapper
> is very slow.
>
> So if I try to refresh the three one by calling rw1.Render(); rw2.Render();
> rw3.Render();, the result will be rw1 refresh, wait for N seconds, rw2
> refresh, wait for N seconds, rw3 refresh.
>
> This makes the program looks very asynchronously. How to make the three
> RenderWindows refresh at the same time?
>
> Regards.
>
> zlf



More information about the vtkusers mailing list