Difference between revisions of "Talk:Swap Interval"

From OpenGL Wiki
Jump to: navigation, search
(vsync with glFinish)
(talk)
Line 1: Line 1:
 
 
== vsync with glFinish ==
 
== vsync with glFinish ==
 
I'm concerned about the accuracy of this statement:
 
I'm concerned about the accuracy of this statement:
Line 8: Line 7:
  
 
* Yeah, check the previous revision! (Although that in itself may not be reliable.) [[User:X-Fi6|X-Fi6]] 02:46, 11 September 2011 (PDT)
 
* Yeah, check the previous revision! (Although that in itself may not be reliable.) [[User:X-Fi6|X-Fi6]] 02:46, 11 September 2011 (PDT)
 +
 +
:: The only reference made to {{code|glFinish}} previously was simply describing its behavior. The point of vsync-ing is not to force the CPU to wait for the GPU to finish rendering. It is to force the GPU to not swap the framebuffers unless a vblank is going on. Whether that makes SwapBuffers operations asynchronous to the CPU or not is irrelevant; what matters is that it eliminates tearing (seeing half of one frame and half of another). Nothing on this page said that using {{code|glFinish}} was necessary to "perfectly achieve vertical synchronization". [[User:Alfonse|Alfonse]] 04:35, 11 September 2011 (PDT)

Revision as of 11:35, 11 September 2011

vsync with glFinish

I'm concerned about the accuracy of this statement:

On Windows, apart from rendering the picture at least twice as fast as the monitor's refresh rate (per the rules of the Sampling Theorem), SwapBuffers() combined with glFinish() is the only method supported on modern hardware to perfectly achieve vertical synchronization (vsync).

I have never seen this stated anywhere. I am not aware of any reason for a SwapBuffers operation to have to be followed by glFinish in order to vsync. The point of swap interval is to not have to do anything special (other than specifying the swap interval) to get vsync support. Do you have some source for this information? Alfonse 02:09, 11 September 2011 (PDT)

  • Yeah, check the previous revision! (Although that in itself may not be reliable.) X-Fi6 02:46, 11 September 2011 (PDT)
The only reference made to glFinish previously was simply describing its behavior. The point of vsync-ing is not to force the CPU to wait for the GPU to finish rendering. It is to force the GPU to not swap the framebuffers unless a vblank is going on. Whether that makes SwapBuffers operations asynchronous to the CPU or not is irrelevant; what matters is that it eliminates tearing (seeing half of one frame and half of another). Nothing on this page said that using glFinish was necessary to "perfectly achieve vertical synchronization". Alfonse 04:35, 11 September 2011 (PDT)