diff options
Diffstat (limited to 'gui/src/main.cpp')
| -rw-r--r-- | gui/src/main.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gui/src/main.cpp b/gui/src/main.cpp index 52f9d48..521be02 100644 --- a/gui/src/main.cpp +++ b/gui/src/main.cpp @@ -25,12 +25,21 @@ int main(int argc, char *argv[]){ settings.resizable = true; shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings); + // uncomment next line to share main's OpenGL resources with gui + settings.shareContextWith = mainWindow; + + settings.width = 800; + settings.height = 450; + settings.setPosition(ofVec2f(1400,0)); + settings.resizable = true; + shared_ptr<ofAppBaseWindow> previewWindow = ofCreateWindow(settings); + previewWindow->setVerticalSync(false); + settings.width = 1600; - settings.height = 200; + settings.height = 400; 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); @@ -40,7 +49,10 @@ int main(int argc, char *argv[]){ ofAddListener(mainWindow->events().update,mainApp.get(),&ofApp::updateOutput); ofAddListener(mainWindow->events().draw,mainApp.get(),&ofApp::drawOutput); ofAddListener(mainWindow->events().windowResized,mainApp.get(),&ofApp::outputWindowResized); + ofAddListener(mainWindow->events().keyPressed,mainApp.get(),&ofApp::outputKeyPressed); + ofAddListener(previewWindow->events().draw,mainApp.get(),&ofApp::drawOutput); + ofRunApp(guiWindow, mainApp); ofRunMainLoop(); } |
