27 lines
404 B
C++
27 lines
404 B
C++
#include "app.hpp"
|
|
|
|
#include <NSWrapper.hpp>
|
|
|
|
#include <memory>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
NSAppWrapper app;
|
|
unique_ptr<App> a;
|
|
app.create_window({
|
|
[&](ContextParameters ctxp){
|
|
a = make_unique<App>(ctxp.context);
|
|
},
|
|
[&](ContextParameters){
|
|
a->draw();
|
|
},
|
|
[&](ContextParameters, CGFloat w, CGFloat h){
|
|
a->resize(size_t(floor(w)), size_t(floor(h)));
|
|
}
|
|
});
|
|
|
|
app.run();
|
|
}
|
|
|
|
|