synchronous buffer swapping
Lisa S. Avila
lisa.avila at kitware.com
Wed Apr 5 23:40:30 EDT 2000
Hello David,
I don't see any reason why you shouldn't make these changes. Definitely
MakeCurrent() should be called any place where the OpenGL context might not
be the intended one. I have been bitten by bugs related to having the wrong
context more times than I would care to admit!
Lisa
At 03:40 PM 4/5/00, David Gobbi wrote:
>Hi Will,
>
>We have an application with several render windows, and I'm using
>the SwapBuffers flag to cause them to all update simultaneously,
>like this (apologies to non-python users):
>
># first turn off SwapBuffers and do the renders
>for renWin in renderWindows:
> renWin.SwapBuffersOff()
> renWin.Render()
># swap the buffers
>for renWin in renderWindows:
> renWin.SwapBuffersOn()
> renWin.Frame()
>
>This works nicely under UNIX, all the windows update in sync.
>However, the vtkWin32OpenGLRenderWindow ignores the SwapBuffers
>flag (it always swaps when Render or Frame is called). Also unlike
>UNIX, on Win32 the Frame command must be proceeded by MakeCurrent
>in order to work properly.
>
>So, I was wondering if I could change vtkWin32OpenGLRenderWindow::Frame()
>so that
> 1) it checks this->SwapBuffers and
> 2) it calls this->MakeCurrent() before SwapBuffers().
>This would make it behave the same as UNIX, and (as far as I've
>tested) won't break anything. No one has messed with the Frame()
>command for years, so I thought I should ask first...
>
> - David
>
>--
> David Gobbi, MSc dgobbi at irus.rri.on.ca
> Advanced Imaging Research Group
> Robarts Research Institute, University of Western Ontario
>
>--------------------------------------------------------------------
>This is the private VTK discussion list. Please keep messages on-topic.
>Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
><majordomo at public.kitware.com>. For help, send message body containing
>"info vtkusers" to the same address.
>--------------------------------------------------------------------
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list