PDA

View Full Version : SwapBuffer command in X11 on a Mac



iJames
05-23-2011, 02:22 PM
When using UNIX ported apps in X11 on a current Mac, the swapbuffer() command doesn't seem to be waiting for the vertical blank period. It used to function just fine. Is there a way around this? Possibly a driver setting on the card or using a different card? Was any part of that process deprecated as far as you are aware? I'm hesitant to ask for a code modification as this isn't my code but rather a port.

ZbuffeR
05-24-2011, 12:13 AM
By default, swapbuffer may or may not wait for vsync.
You have to explicitely ask for a a swap interval=1 to have more consistent vsync :
http://www.opengl.org/wiki/Swap_Interval

Dan Bartlett
05-24-2011, 06:05 AM
Using the swap control extensions is the way to go, but even if you do request a swap interval of 1 (vsync on), then it's often possible to override this setting in the graphics card driver control panel. They usually have "Force On"/"Force Off"/"Application Controlled" option.