For OpenGL, you can subclass NSOpenGLView and use CVDisplayLink to synchronize to the display.

This sample code from Apple is a good starting point:
https://developer.apple.com/libra...ssentials/Introduction/Intro.html