The Fruitz of Dojo port has had vid_vsync for ages although the cvar name is vid_wait.
void VID_SetWait (UInt32 theState)
{
const long params = theState;
// set theState to 1 to enable, to 0 to disable VBL syncing.
[gGLContext makeCurrentContext];
if(CGLSetParameter (CGLGetCurrentContext (), kCGLCPSwapInterval, �ms) == CGDisplayNoErr)
{
gGLVideoWait = vid_wait.value;
if (theState == 0)
{
Con_Printf ("video wait successfully disabled!\n");
}
else
{
Con_Printf ("video wait successfully enabled!\n");
}
}
else
{
vid_wait.value = gGLVideoWait;
Con_Printf ("Error while trying to change video wait!\n");
}
}
And the part that calls that function:
void GL_EndRendering (void)
{
// set the gamma if fullscreen:
if (gVidDisplayFullscreen == YES)
{
VID_SetGamma ();
CGLFlushDrawable ([gGLContext cglContext]);//CGLGetCurrentContext ());
}
else
{
// if minimized, render inside the Dock!
GL_RenderInsideDock ();
}
// check if video_wait changed:
if(vid_wait.value != gGLVideoWait)
{
VID_SetWait ((UInt32) vid_wait.value);
}
http://www.fruitz-of-dojo.de/php/download.php4?dlnr=2