NSOpenGLView: post Xcode9 how to get NSBitmapGraphicsContext to draw to screen?

I'm trying to get Apple's FunHouse app to build in newer Xcode releases - post Xcode 9 the main window is black. What I've learned is that in Xcode 9, when the

NSOpenGLView
asked for the current
graphicsContext
in
drawRect:
, it gets back a
NSWindowGraphicsContext
. In Xcode 10+, it gets a
NSBitMapGraphicsContext
. [It only gets this when you force the subclass to NOT use a layer backed view, which seems to be the post-9 default, otherwise there is no
currentContext
.]


All this code needs rework, but its easier to start with something that works and improve it, instead of trying this and that and having it not work. The subclass'

drawRect
tests if the context is drawing to the screen, and takes different paths depending on the result.

So really, my question is - given that I can draw to this

NSBitMapContext
, how to I get this bitmap drawn to the screen?


Thanks in advance for any suggestions!


David