summaryrefslogtreecommitdiff
path: root/gui/src/main.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@getdrop.com>2017-09-01 15:57:45 +0100
committerTim Redfern <tim@getdrop.com>2017-09-01 15:57:45 +0100
commit5ebbcf534eb74469f09d5822f4d99478efe84794 (patch)
tree864cb0598111224f12a3fc8c1f5b7f44b8bd85b4 /gui/src/main.cpp
parent14da9cce8d665d2872b76909e8abc001a9921297 (diff)
working DMX
Diffstat (limited to 'gui/src/main.cpp')
-rw-r--r--gui/src/main.cpp18
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();
}