I have a DLP-Link 3D projector which I'd like to make use of by means of a hand-made player.
So far in my project: A class MovieView : NSView
within a NSWindow
, with stub drawing codes.
I know that, if I place drawing codes in the func draw(...)
function, then NSGraphicsContext.current
will be set up for me to use. But I'm drawing from a high-priority thread (the DisplayLink), so I obviously have to set it up myself.
How should I do that in Swift?