OpenGL in Yosemite: drawInCGLContext not called

The MacOS application I'm working on renders using Metal when available, but falls back to using OpenGL via CAOpenGLLayer for older OS versions.


In Mac OS 10. Mac OS 10.10 (Yosemite), when the window is full screen, the layer's canDrawInCGLContext:pixelFormat:forLayerTime:displayTime: method is called (and returns YES), but after the first frame, calls to drawInCGLContext:pixelFormat:forLayerTime:displayTime: do not happen.


The same behaviour occurs whether the layer is set to asynchronous, or when using explicit calls to setNeedsDisplay.


Drawing in a non-fullscreen window works as expected.


A simplified test app using CAOpenGLLayer works as expected. The main app uses SDL for window management (but not rendering), which could be a complication.


Mac OS 10.11 and up work as expected.


Does anyone have any ideas about why drawInCGLContext would not be called when canDrawInCGLContext returns YES?


(I don't have direct access to the test computer running Yosemite so debugging this is pretty roundabout.)


Thanks,


-- dwn