Draw from a separate thread with NSOpenGLLayer
问题 I'm working on an app which needs to draw with OpengGL at a refresh rate at least equal to the refresh rate of the monitor. And I need to perform the drawing in a separate thread so that drawing is never locked by intense UI actions. Actually I'm using a NSOpenGLView in combination with CVDisplayLink and I'm able to achive 60-80FPS without any problem. Since I need also to display some cocoa controls on top of this view I tried to subclass NSOpenGLView and make it layer-backed, following