// // NSWrapper.hpp // XcodeOpenCL // // Created by Joshua Moerman on 13/04/14. // // #pragma once #include #include #include struct GLContext; struct ContextParameters{ GLContext & context; }; struct GLViewFunctionality { // All three will only be called with the current gl context already set // May be called from different threads std::function initialize_callback; std::function draw_callback; std::function resize_callback; }; // returns a GLViewFunctionality with only its draw function set. GLViewFunctionality simple_draw(std::function f); struct NSAppWrapper { NSAppWrapper(); ~NSAppWrapper(); void run(); void create_window(GLViewFunctionality const &); std::unique_ptr impl; };