summaryrefslogtreecommitdiff
path: root/gistanalysis/src/main.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@getdrop.com>2018-05-22 22:21:52 +0100
committerTim Redfern <tim@getdrop.com>2018-05-22 22:21:52 +0100
commitcd298b5bf00661ce31ae1d4498de58d5291477f2 (patch)
treef667bb56703380eec230fbf9acf0cd4988f90ffc /gistanalysis/src/main.cpp
parent583804a9b5c412849c9dc5e9947dd537aee3bb8b (diff)
&%0%& content?
Diffstat (limited to 'gistanalysis/src/main.cpp')
-rw-r--r--gistanalysis/src/main.cpp46
1 files changed, 40 insertions, 6 deletions
diff --git a/gistanalysis/src/main.cpp b/gistanalysis/src/main.cpp
index e57370b..1abb772 100644
--- a/gistanalysis/src/main.cpp
+++ b/gistanalysis/src/main.cpp
@@ -2,12 +2,46 @@
#include "ofApp.h"
//========================================================================
-int main( ){
- ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
+int main(int argc, char *argv[]){
- // this kicks off the running of my app
- // can be OF_WINDOW or OF_FULLSCREEN
- // pass in width and height too:
- ofRunApp(new ofApp());
+
+ ofGLFWWindowSettings settings;
+
+ settings.decorated = true;
+
+ settings.width = 1024;
+ settings.height = 768 ;
+ settings.setPosition(ofVec2f(1700,0));
+ settings.resizable = false;
+
+ shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
+ mainWindow->setVerticalSync(false);
+
+ settings.width = 600;
+ settings.height = 900;
+ settings.setPosition(ofVec2f(0,0));
+ settings.resizable = true;
+
+ // share OpenGL resources with other windows
+ settings.shareContextWith = mainWindow;
+
+ //settings.decorated = false; //doesn't suppress FS title bar
+ 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);
+ ofAddListener(mainWindow->events().keyPressed,mainApp.get(),&ofApp::outputKeyPressed);
+ ofAddListener(mainWindow->events().keyReleased,mainApp.get(),&ofApp::outputKeyReleased);
+ ofAddListener(mainWindow->events().mouseDragged,mainApp.get(),&ofApp::outputMouseDragged);
+ ofAddListener(mainWindow->events().mousePressed,mainApp.get(),&ofApp::outputMousePressed);
+ ofAddListener(mainWindow->events().mouseReleased,mainApp.get(),&ofApp::outputMouseReleased);
+
+ ofRunApp(guiWindow, mainApp);
+ ofRunMainLoop();
}