Re:Apple's CVDisplayLink Doesn't Link to Your Display
by pcwalton on Sunday December 10, 2017 @04:09PM
(#15893511)
Interesting. So if I'm reading this properly, CVDisplayLink is still a timer--it's just that it tries to synchronize itself to the "vblTime" if there's only one of those to synchronize to.
If I'm not mistaken, then, it would seem you can do the same thing yourself by just blocking on CGLFlushDrawable() and setting up a timer on the refresh rate as soon as it returns. (I guess that's similar to what mstange suggested in the comments.) At least CVDisplayLink tweaks timer parameters in order to get the timer to fire more reliably.
If I'm not mistaken, then, it would seem you can do the same thing yourself by just blocking on CGLFlushDrawable() and setting up a timer on the refresh rate as soon as it returns. (I guess that's similar to what mstange suggested in the comments.) At least CVDisplayLink tweaks timer parameters in order to get the timer to fire more reliably.