I am writing a Cocoa application that uses a C++ library that I am also writing. I want the C++ library to be able to call a draw method in the Cocoa application.
Specifics - to put it into context, I am running OpenNi skeletal tracking and recording the skeletal data. At each new frame, I want to tell the Objective-C code that it can/should draw the data to screen.
The OpenNI tracking code is called by (and has a handle to) a control object SkeletalModuleControl. The only object the Objective-C code interacts with is this control class. My thoughts are that it would be best to create callDraw and registerDraw methods in the control class. The Objective-C code would register its draw method (or multiple draw methods?) and the callDraw would call the registered draw methods (if any).