synchronous buffer swapping

David Gobbi dgobbi at irus.rri.on.ca
Wed Apr 5 15:40:27 EDT 2000


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.
--------------------------------------------------------------------



More information about the vtkusers mailing list