title: Using C++ code with OpenGL in a Cocoa application
body: <p>I have created a Rubick's Cube model in OpenGL on C++ and now need to make it into an app for OS X. </p>
  
  <p>I have found a tutorial(<a href="https://riptutorial.com/opengl/example/13875/creating-opengl-4-1-with-cplusplus-and-cocoa" rel="nofollow noreferrer">https://riptutorial.com/opengl/example/13875/creating-opengl-4-1-with-cplusplus-and-cocoa</a>) on that matter, however, I can't follow it completely as I need the main menu(on the top bar) to still be usable and catch events in order to manipulate the cube.</p>
  
  <p>I have the necessary methods to manipulate the cube, the main problem is to call them from Obj-C code which is responsible for the Cocoa app itself. Is there a way to link what view controller displays with the C++ code responsible for drawing and how do I catch and process events if I need to summon C++ code for that?</p>
  
  <p>I do understand that I basically need a wrapper for the C++ code, however, I struggled to find any up to date info(guides, similar topics on StackOverflow, etc.) on the matter.</p>