diff options
Diffstat (limited to 'gui/src/main.cpp')
| -rw-r--r-- | gui/src/main.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/gui/src/main.cpp b/gui/src/main.cpp index 072f406..52f9d48 100644 --- a/gui/src/main.cpp +++ b/gui/src/main.cpp @@ -3,6 +3,7 @@ //======================================================================== int main(int argc, char *argv[]){ + /* ofSetupOpenGL(1600,200,OF_WINDOW); // <-------- setup the GL context // this kicks off the running of my app @@ -10,10 +11,37 @@ int main(int argc, char *argv[]){ // pass in width and height too: ofApp *app = new ofApp(); - app->arguments = vector<string>(argv, argv + argc); + ofRunApp(app); // start the app + */ + + //app->arguments = vector<string>(argv, argv + argc); + + ofGLFWWindowSettings settings; + settings.width = 1024; + settings.height = 576; + settings.setPosition(ofVec2f(300,0)); + settings.resizable = true; + shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings); + + settings.width = 1600; + settings.height = 200; + settings.setPosition(ofVec2f(0,700)); + settings.resizable = true; + // uncomment next line to share main's OpenGL resources with gui + settings.shareContextWith = mainWindow; + shared_ptr<ofAppBaseWindow> guiWindow = ofCreateWindow(settings); + guiWindow->setVerticalSync(false); + + shared_ptr<ofApp> mainApp(new ofApp); + //mainApp->setupGui(); + ofAddListener(mainWindow->events().update,mainApp.get(),&ofApp::updateOutput); + ofAddListener(mainWindow->events().draw,mainApp.get(),&ofApp::drawOutput); + ofAddListener(mainWindow->events().windowResized,mainApp.get(),&ofApp::outputWindowResized); + ofRunApp(guiWindow, mainApp); + ofRunMainLoop(); }
\ No newline at end of file |
